Regular Stars

unhandled

(Fazloullah Rahmani) #1

Hi guys

help please
In Rhino we can create regular stars from Polygon command. With the polygon component I don’t see how, or is there a component for stars.
Otherwise, how to force points to be aligned with other points. I don’t know if you see what I mean, look at the second picture, how to force the points A and B to be aligned with points 2 and 4.
thank you so much

Star1

Star2


#3


(Aris Nikolopoulos) #4

hi, here is a way
star.gh (11.4 KB)


#5

This code is adapted from one of the threads I referred to above, but it does not align the points for you, as you described. It was written for a different purpose and depends on the ‘shape’ slider to align those points manually. Will give it another look…


stars_2018Feb9a.gh (11.2 KB)


#6

My two cents…

Star_re.gh (9.5 KB)


(Fazloullah Rahmani) #7

Joseph_Oster
Thank you very much, I will see the definitions in detail, I think it will be perfect.

djnelson75
The star at 6 is just an example. But the difficulty is to find the right scale ratio to have the points alignment.


(Fazloullah Rahmani) #8

HS_Kim
Nickel :grinning::heart_eyes::heart_eyes:, but it works only for stars whose number is even, I used 3.5 for segments to have a star to 7 but it gives a star to 7 which is not regular. I’m afraid it takes more effort.
thank you very much


(Fazloullah Rahmani) #9

Good but How to control shape to have regular star (aligned points)

Star3
Thank you


#10

Very good! Two minor quibbles:

  1. Rotation is extraneous and irrelevant to the primary issue.
  2. Stream Filter won’t handle lists of ‘Radius’ or ‘Count’ values.

Haven’t got a solution yet for #2 but it’s a common problem. Good job on the main issue here though.

@anikolo already answered that question.


(Aris Nikolopoulos) #11

thanks!
this guy has got me searching for concave polygon definitions in wolfram.
(nothing so far!)


(Fazloullah Rahmani) #12

Aris Nikolopoulosanikolo
Nickel Thank you very much


(Fazloullah Rahmani) #13

Thanks a thousand times to all for the efforts you are kind


#14

Here it is!


stars_2018Feb9b.gh (11.9 KB)


(Fazloullah Rahmani) #15

Joseph_Oster
Perfect thank you very much :heart_eyes::heart_eyes::heart_eyes:


#16

@anikolo gets primary credit for this one. Cheers.


(Fazloullah Rahmani) #17

yes to yours :wink:


(Aris Nikolopoulos) #18

heyyyy!!!
it’s not about credit! it’s about having fun! (and not having a girlfriend hahahaha)
but thanks!


#19

This is totally irrelevant to the original problem, but just in case anyone wonders why the ‘Radius’ sliders are not in the same sequence as the ‘Count’ sliders… It’s because of the order in which I connected the wires. That ambiguity can be avoided by using Merge to explicitly define the sequence of inputs. Highly recommended on complex code where sometimes, that sequence can make a big difference.


(Fazloullah Rahmani) #20

thank you Joseph_Oster for that precision


(Aris Nikolopoulos) #21

…and the mathematical way…
star.gh (9.1 KB)