Author Message
ufoace

Joined: 11 Mar 2013
Posts: 46 Posted: Wed May 22, 2013 8:52 am    Post subject: axial symmetry in an ISO field? 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!   Furan

Joined: 05 Oct 2010
Posts: 64
Location: Prague, Czech Republic Posted: Wed May 22, 2013 5:13 pm    Post subject: 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    ufoace

Joined: 11 Mar 2013
Posts: 46 Posted: Thu May 23, 2013 6:07 pm    Post subject: 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   denisc

Joined: 24 Apr 2013
Posts: 92 Posted: Thu May 23, 2013 11:14 pm    Post subject: 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    ufoace

Joined: 11 Mar 2013
Posts: 46 Posted: Fri May 24, 2013 7:41 pm    Post subject: 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.   Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT Page 1 of 1

 Jump to: Select a forum MathMod----------------MathMod Progress & featuresMathematical Models CollectionHow toBugsMathMod for WindowsMathMod for Linux/UnixMathMod For MACOSXMathMod TutorialsOther Mathematical ToolsOpen Discussion K3DSurf----------------K3DSurf Discuss/DiscussionsHow toK3DSurf math related questionsK3DSurf for WindowsK3DSurf for MacOSK3DSurf for LinuxOnline K3DSurf: J3DSurfNewsBugsOnline DocumentationAccount Activation Issue ?/ Problème d'activation de votre compte ?
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