axial symmetry in an ISO field?

 
Post new topic   Reply to topic    K3DSurf forum Forum Index -> Mathematical Models Collection
View previous topic :: View next topic  
Author Message
ufoace



Joined: 11 Mar 2013
Posts: 46

PostPosted: Wed May 22, 2013 8:52 am    Post subject: axial symmetry in an ISO field? Reply with quote

I'd love to know how to reflect an isosurface shape to make things like starfish, and kaleidoscope etc, not like 3d symmetry, only on x and y... rotational symmetry?

I can't think of it yet, could you please tell me?
same as this:
http://pbskids.org/cyberchase/media/games/symmetry/

for example cylinder f(x*x+z*z -.5)

how to rotate it around the z axis so it is 5 cylinders joined in middle? i will find eventually it will take me a day though! i even think i have programmed it before!
Back to top View user's profile Send private message
Furan



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

PostPosted: Wed May 22, 2013 5:13 pm    Post subject: Reply with quote

By using modulo function
If not available, use this:
mod(A,b) = b*{0.5+1/pi*arctan tan [pi*(A/b-0.5)]}

Rotation along z axis:
phi0 = angular period [rad]
phi = mod(atan2(y,x), phi0)

r = sqrt(x*x+y*y)
xp = r*sin(phi)
yp = r*cos(phi)
F(xp,yp)
I forgot:
F(xp,yp) will display repeatedly the function F(x,y) at x,y: 0 =< atan2(y,x) =< phi0
Back to top View user's profile Send private message Visit poster's website
ufoace



Joined: 11 Mar 2013
Posts: 46

PostPosted: Thu May 23, 2013 6:07 pm    Post subject: Reply with quote

Thank you Furan!!! that fantastic!

here is a video of some of the things i coded using the formula... i found a kind of lofi shape generator...

http://www.youtube.com/watch?v=TV-9PFoRJTg&feature=youtu.be

here is small demo except have to press 2x times "update all" otherwise there is a bug.
https://dl.dropboxusercontent.com/u/114667999/shapegen/shapegen.html
Thanks so much.


Last edited by ufoace on Fri May 24, 2013 7:45 pm; edited 1 time in total
Back to top View user's profile Send private message
denisc



Joined: 24 Apr 2013
Posts: 92

PostPosted: Thu May 23, 2013 11:14 pm    Post subject: Reply with quote

hello


if i understand
you can replace x and y by:

xp = r*sin(phi)

yp = r*cos(phi)

for x*x+y*y -.5

the result:

pi/4=45 degre
(sqrt(x*x+y*y) *sin(pi/4*(0.5+1/pi*atan(tan(pi*(atan2(y,x)/pi/4-0.5))) )))^2
+ (sqrt(x*x+y*y) *cos(pi/4*(0.5+1/pi*atan(tan(pi*(atan2(y,x)/pi/4-0.5))) )))^2-.5

in k3d is always a cylinder ?


can you make a concret example, with picture; in k3d, please ?

(with formula)

i think that will more easy to understand for all people ?

thank

denisc
Back to top View user's profile Send private message Send e-mail
ufoace



Joined: 11 Mar 2013
Posts: 46

PostPosted: Fri May 24, 2013 7:41 pm    Post subject: Reply with quote

Code:
   var phi0  = Math.PI/3;
   var phi2  = Math.PI/6;
   var phi=Math.Repeat(Mathf.Atan2(x,z),phi0 );// that's a modulo
   var rt = Math.Sqrt(x*x+z*z) ;
   var xp = rt*Math.Sin(phi-phi2) ;
   var zp = rt*Math.Cos(phi-phi2) ;
return (xp*xp + zp*zp -.5);


that's the code so you have x and z turn around. the above example is cylinder.

i had the example of my demo file wrong here:
https://dl.dropboxusercontent.com/u/114667999/shapegen/shapegen.html
press update twice to renew every time.
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    K3DSurf forum Forum Index -> Mathematical Models Collection 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