Need help with the math for a 5 sided torus

 
Post new topic   Reply to topic    K3DSurf forum Forum Index -> How to
View previous topic :: View next topic  
Author Message
Kevin Caron



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

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

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/3-2*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 View user's profile Send private message Send e-mail Visit poster's website AIM Address
Furan



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

PostPosted: Mon Sep 22, 2014 10:36 pm    Post subject: Reply with quote

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+(r-R)/r*v)+(R-r)*cos(u/m+v)
h   =      r*sin(u/m+(r-R)/r*v)+(R-r)*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 View user's profile Send private message Visit poster's website
Kevin Caron



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

PostPosted: Mon Sep 22, 2014 10:53 pm    Post subject: Reply with quote

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 View user's profile Send private message Send e-mail Visit poster's website AIM Address
Kevin Caron



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

PostPosted: Mon Sep 22, 2014 11:51 pm    Post subject: Reply with quote

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 View user's profile Send private message Send e-mail Visit poster's website AIM Address
nextstep
Site Admin


Joined: 06 Jan 2007
Posts: 538

PostPosted: Tue Sep 23, 2014 12:10 am    Post subject: Reply with quote

Hi,
Here you go:
Five sides:
Quote:
{
"Param3D": {
"Name": [
"HypocycloidFiveSides"
],
"Component": [
"HypocycloidFiveSides "
],
"Fx": [
"sin(u)* (3 + 0.2*cos(u/5+(0.2-1)/0.2*v)+(1-0.2)*cos(u/5+v))"
],
"Fy": [
"cos(u)* (3 + 0.2*cos(u/5+(0.2-1)/0.2*v)+(1-0.2)*cos(u/5+v)) "
],
"Fz": [
"0.2*sin(u/5+(0.2-1)/0.2*v)+(1-0.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.1-1)/0.1*v)+(1-0.1)*cos(u/10+v))"
],
"Fy": [
"cos(u)*(3+0.1*cos(u/10+(0.1-1)/0.1*v)+(1-0.1)*cos(u/10+v))"
],
"Fz": [
"0.1*sin(u/10+(0.1-1)/0.1*v)+(1-0.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 Smile
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 View user's profile Send private message
Kevin Caron



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

PostPosted: Tue Sep 23, 2014 4:11 am    Post subject: Reply with quote

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 View user's profile Send private message Send e-mail Visit poster's website AIM Address
nextstep
Site Admin


Joined: 06 Jan 2007
Posts: 538

PostPosted: Tue Sep 23, 2014 11:08 pm    Post subject: Reply with quote

You're welcome!
Hope it's going to work for you.
Also we will be pleased to see the final result Smile
_________________
Cheers,
Abderrahman
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    K3DSurf forum Forum Index -> How to All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


2005 Powered by phpBB © 2001, 2005 phpBB Group


Start Your Own Video Sharing Site

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com