Logo by Maya - 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: Support us via Flattr FLATTR Link
 
*
Welcome, Guest. Please login or register. March 29, 2024, 01:26:04 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 1132 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 5106 Last post April 02, 2007, 03:16:32 AM
by bradorpoints
Menger sponge fly-through 3D Fractal Generation twinbee 10 6669 Last post February 16, 2009, 05:43:21 AM
by twinbee
4D Menger sponge Sierpinski Gasket « 1 2 » makc 27 17569 Last post December 09, 2016, 04:01:39 PM
by knighty
Menger Sponge 45 Rotation Sierpinski Gasket « 1 2 » trafassel 25 7984 Last post December 17, 2016, 01:17:32 PM
by trafassel
Menger City Cruise - 360 Degree Fractal Scenery Still Frame - Fractalforums Postcard KRAFTWERK 0 1027 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.201 seconds with 29 queries. (Pretty URLs adds 0.006s, 2q)