cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Equation guru's

John.Pryal
12-Amethyst

Equation guru's

Hi all, is it possible to define the curve shape shown in the attached image by equation only? I know this can be done using surfaces & trapar, then just coping the resultant edge, but i was just trying to simplify my approach. (its the star shape i am after).

STAR.JPG

Regards

John

1 ACCEPTED SOLUTION

Accepted Solutions

How about this one?star+shaped+curve+from+equation.jpg

View solution in original post

7 REPLIES 7

How about this one?star+shaped+curve+from+equation.jpg

yep, pretty straight forward...

the key element is R

Cos() and Sin() work similarly; it tells it how to start. Each has a value range of -1 to 1. Sin starts at and ends at 0, cos starts at 1and ends at 1.

(360*8) is the number of cycles (360 is one full cycle)

To keep the equation "positive", the initial radius is set to 1

Theta just says to rotate once (360 degrees) by saying "t*360" it specifies a range from 0 to 360.

Z... well Z is Z. You can operate on Z is you want somethign like a helix.

Notice that the "type" of equation is cylindrical. Remember to pick a CSYS.

star.PNG

... T is essentially trajpar. Trajpar is always 0 to 1... where in the equation, you can extend the range of T.

And don't forget "fun with powers and signs"

ODD POWER... "Reversal"

starII.PNG

EVEN POWER... "Squaring"

starIII.PNG

You can control a "flat" region at one end of the "wave" by high order powers. Changing the sign will control where the flat it.

2- vs. 1+

starIV.PNG

Thank you both, for your replies. Antonius, you have taken this to another level. I never knew you could create such geometry using equations. Actually, not quite true, i downloaded a part some time ago from this forum (equation_curves) there are some curves there that blow the mind, well my mind anyway. Thank you for your detailed explanations. Could i trouble you further? When i copy the equation (the first equation, your intial answer) as you have it written, then obviously, i get the same results as you, but if i start to change the 'r' value, then the resultant star shape is totally different, the amplitude reduces. Say 'r' = 50 then you almost get a circle, very little amplitude. What i want to be able to do is control the radius, the numbers of arms (points, call them what you will) & the amount the curve deviates either side of the radius, i guess you would call this amplitude. Hopefully, i am making sense.

edit : Ok, with a little more messing about, i figured this out, but i still welcome any input you may have.

Regards

John

Ah, yes. The "1" for the R is the initial value. The amplitude is governed by the second part of the statement since the cosine value is always a total of 2, I added a division at the end to limit the amplitude to be scaled to the R=1 value. If you have a large initial R, you also want to multiply the cosine statement: instead of divide by 5, multiply by 10 if R=50

I don't like messing around with T. I have found occasion to use T = -1 to 1 but only if I don't need a SIN or COS. In theory, you can also manage the number of arms with T instead of the equation, but notice that Theta also has a T operator. T is just a range of values. I have had Creo simply ignore T. I suspect it is my error in using a negative value incorrectly. Point is, it doesn't always warn you and appears to be working as specified.

Thank you for your time & effort Antonius.

Best Regards

John

Announcements
Business Continuity with Creo: Learn more about it here.

Top Tags