View previous topic :: View next topic 
Author 
Message 
Kevin Caron
Joined: 13 Oct 2013 Posts: 7 Location: United States

Posted: Sun Sep 21, 2014 9:31 pm Post subject: Need help with the math for a 5 sided torus 


So I know that this will give me a "3" sided torus but how can I change it to get a "5" sided one?
sin(u)*(7+cos(u/3 2*v)+2*cos(u/3+v))
cos(u)*(7+cos(u/3  2*v)+2*cos(u/3+v))
sin(u/32*v)+2*sin(u/3+v)
pi, pi
pi, pi
Have tried changing the 3s to 5 but that won't work...
Any ideas?!?!?!? _________________ From the desk of Kevin Caron, where the answers are stranger then the questions! 

Back to top 


Furan
Joined: 05 Oct 2010 Posts: 64 Location: Prague, Czech Republic

Posted: Mon Sep 22, 2014 10:36 pm Post subject: 


The meridian is a hypocycloid:
http://en.wikipedia.org/wiki/Hypocycloid
Code: 
x = sin(u)*rho
y = cos(u)*rho
z = h
rho = R3 + r*cos(u/m+(rR)/r*v)+(Rr)*cos(u/m+v)
h = r*sin(u/m+(rR)/r*v)+(Rr)*sin(u/m+v)
Try R3 = 3; R = 1; r = 0.2; m = R/r = 5 = number of corners
u = [pi..pi]; v = [pi..pi]



Back to top 


Kevin Caron
Joined: 13 Oct 2013 Posts: 7 Location: United States

Posted: Mon Sep 22, 2014 10:53 pm Post subject: 


Thank you so much!!
Now if I can just figure out where each line goes!
Not very good with this program but I am having fun learning... _________________ From the desk of Kevin Caron, where the answers are stranger then the questions! 

Back to top 


Kevin Caron
Joined: 13 Oct 2013 Posts: 7 Location: United States

Posted: Mon Sep 22, 2014 11:51 pm Post subject: 


Kind of what I figured...
I am too dumb to put these in the program and make it work..
Keep getting a "syntax error".
Can you reorder it so it is like the other one?
Or can you give me a little direction so I know where the numbers are supposed to go?
Please! _________________ From the desk of Kevin Caron, where the answers are stranger then the questions! 

Back to top 


nextstep Site Admin
Joined: 06 Jan 2007 Posts: 539

Posted: Tue Sep 23, 2014 12:10 am Post subject: 


Hi,
Here you go:
Five sides:
Quote:  {
"Param3D": {
"Name": [
"HypocycloidFiveSides"
],
"Component": [
"HypocycloidFiveSides "
],
"Fx": [
"sin(u)* (3 + 0.2*cos(u/5+(0.21)/0.2*v)+(10.2)*cos(u/5+v))"
],
"Fy": [
"cos(u)* (3 + 0.2*cos(u/5+(0.21)/0.2*v)+(10.2)*cos(u/5+v)) "
],
"Fz": [
"0.2*sin(u/5+(0.21)/0.2*v)+(10.2)*sin(u/5+v)"
],
"Umax": [
"pi"
],
"Umin": [
"pi"
],
"Vmax": [
"pi"
],
"Vmin": [
"pi"
]
}
} 
Ten sides:
Quote:  {
"Param3D": {
"Name": [
"HypocycloidTenSides "
],
"Component": [
"HypocycloidTenSides "
],
"Fx": [
"sin(u)*(3+0.1*cos(u/10+(0.11)/0.1*v)+(10.1)*cos(u/10+v))"
],
"Fy": [
"cos(u)*(3+0.1*cos(u/10+(0.11)/0.1*v)+(10.1)*cos(u/10+v))"
],
"Fz": [
"0.1*sin(u/10+(0.11)/0.1*v)+(10.1)*sin(u/10+v)"
],
"Umax": [
"pi"
],
"Umin": [
"pi"
],
"Vmax": [
"pi"
],
"Vmin": [
"pi"
]
}
} 
NB:
1) Of course, Furan is the one to compliment for this work
2) I'm not sure wich version you're using so I made a script without any constantes on function definition. This way I'm sure the script is going to work. _________________ Cheers,
Abderrahman 

Back to top 


Kevin Caron
Joined: 13 Oct 2013 Posts: 7 Location: United States

Posted: Tue Sep 23, 2014 4:11 am Post subject: 


There is some much to learn here!!
Thank you for taking the time to fix this..
I will try to input this and get it to work..
I am a sculptor and have been asked to make a proposal for a 5 "sided" torus.
Need this for the paper work so I can get this job!!!
Making it in steel is easy, making is on paper is VERY hard!!!!! _________________ From the desk of Kevin Caron, where the answers are stranger then the questions! 

Back to top 


nextstep Site Admin
Joined: 06 Jan 2007 Posts: 539

Posted: Tue Sep 23, 2014 11:08 pm Post subject: 


You're welcome!
Hope it's going to work for you.
Also we will be pleased to see the final result _________________ Cheers,
Abderrahman 

Back to top 


