Logo by fractalwizz - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit us on facebook
 
*
Welcome, Guest. Please login or register. February 28, 2020, 04:16:29 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Menger Sponge, 45 Degree Rotation  (Read 331 times)
0 Members and 1 Guest are viewing this topic.
trafassel
Fractal Bachius
*
Posts: 531


trafassel
« on: November 24, 2016, 07:17:51 PM »

Menger Sponge, 45 Degree Rotation



http://www.fractalforums.com/index.php?action=gallery;sa=view;id=19794

double _scale=4;double _offsetX=1.5;double _offsetY=1.5;double _offsetZ=1.5;double _bailout=2;double _angleX=0;double _angleY=0;double _angleZ=0;public override void Init(){base.Init();if(GetString("intern.Formula.TempUpdateVal")!="7adef8e1846476a9a01954012d687b88"){SetParameterBulk("Formula.Parameters: angleX=0 angleY=0 angleZ=45 bailout=44 offsetX=2.4 offsetY=1.1 offsetZ=1 scale=2.5 Formula.Static: Cycles=14 Julia=1 jx=2 jy=0 jz=0 Scene: CenterX=-0.763429746082816 CenterY=0.329265727596562 CenterZ=-0.522959428364048 Radius=3.66272984947126 Transformation.Camera: AngleX=153.23529497606 AngleY=28.5401934417112 AngleZ=125.103997557095 IsometricProjection=0 Position=1 intern.Formula: TempUpdateVal=7adef8e1846476a9a01954012d687b88");}_scale=GetOrSetDouble("scale");_offsetX=GetOrSetDouble("offsetX");_offsetY=GetOrSetDouble("offsetY");_offsetZ=GetOrSetDouble("offsetZ");_bailout=GetOrSetDouble("bailout");_angleX=Math.PI/180.0*GetOrSetDouble("angleX");_angleY=Math.PI/180.0*GetOrSetDouble("angleY");_angleZ=Math.PI/180.0*GetOrSetDouble("angleZ");}public override bool GetBool(double x,double y,double z){double jx,jy,jz;if (_isJulia){jx=_jx;jy=_jy;jz=_jz;}else {jx=x;jy=y;jz=z;x=_jx;y=_jy;z=_jz;}for (int n=1;n < _cycles;n++){if(n>2 && n <0.6*_cycles){if(x<0)additionalPointInfo.red+=-x;if(y<0)additionalPointInfo.green+=-y;if(z<0)additionalPointInfo.blue+=-z;}x=Math.Abs(x);y=Math.Abs(y);z=Math.Abs(z);if(x>_bailout)return false;if(y>_bailout)return false;if(z>_bailout)return false;if (x<y){double a=x;x=y;y=a;}if (x< z){double a=x;x=z;z=a;}if (y<z){double a=y;y=z;z=a;}x=_scale*x-_offsetX*(_scale-1);y=_scale*y-_offsetY*(_scale-1);z=_scale*z-_offsetZ*(_scale-1);if(_angleX!=0)Rotate(_angleX,ref y,ref z);if(_angleY!=0)Rotate(_angleY,ref x,ref z);if(_angleZ!=0)Rotate(_angleZ,ref x,ref y);x+=jx;y+=jy;z+=jz;}return true;}void Rotate(double angle,ref double x,ref double y){double re=Math.Cos(angle );double im=Math.Sin(angle );double a=re * x-im * y;y=re * y+im * x;x=a;}
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
A Menger Sponge Images Showcase (Rate My Fractal) David Makin 5 3308 Last post April 02, 2007, 03:16:32 AM
by bradorpoints
3D menger sponge fly through Movies Showcase (Rate My Movie) DonWebber 0 1600 Last post September 14, 2010, 01:01:18 AM
by DonWebber
Through the Menger Sponge Movies Showcase (Rate My Movie) Michael Scharrer 0 335 Last post October 17, 2015, 05:55:43 PM
by Michael Scharrer
Menger Sponge 45 Rotation Sierpinski Gasket « 1 2 » trafassel 25 2185 Last post December 17, 2016, 01:17:32 PM
by trafassel
Menger City Cruise - 360 Degree Fractal Scenery Still Frame - Fractalforums Postcard KRAFTWERK 0 399 Last post June 13, 2017, 08:09:13 PM
by KRAFTWERK

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.113 seconds with 29 queries. (Pretty URLs adds 0.005s, 2q)