Logo by simon.snake - 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. November 22, 2025, 05:18:52 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: gettin high  (Read 500 times)
0 Members and 1 Guest are viewing this topic.
yv3
Conqueror
*******
Posts: 149



WWW
« on: October 09, 2011, 12:08:27 AM »



This is my personal approach to implement the Collatz conjecture into a julia fractal wink.

Code:
	
void yFractal::GetFractalColor66()
{
static double x, y, prev_x, prev_y;
static int n, i;

x=m_StartX;
y=m_StartY;

for(n=0; n<m_Iterations; n++)
{
prev_x=x;
prev_y=y;

x=(prev_x*prev_x) - (prev_y*prev_y) - m_CustomRange4;
y=(2.0 * prev_x * prev_y)           + m_CustomRange2;

i=int(prev_x/prev_y);

if(i%2==0)
{
if(m_CustomRange2!=0.0)
{
x=x/1.4;
y=y/1.4;
}
}
else
{
x*=m_CustomRange3;
x+=m_CustomRange1;
y*=m_CustomRange3;
y+=m_CustomRange1;
}

if( ((x*x)+(y*y)) >= m_Magnitude )
{
m_C=int( float(n) * m_ColorPerIteration ); // Return color index from range 0 to (m_NumColors-1)
return;
}
}

m_C=0;
}

Made with yFract.
« Last Edit: October 09, 2011, 12:12:22 AM by yv3 » Logged

Creator of yFract
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
High Beam Wildstyle element90 0 944 Last post May 17, 2012, 09:54:57 PM
by element90
High in the Fractals Still Frame pixlart 0 988 Last post May 15, 2013, 07:40:17 PM
by pixlart
HIGH EVERYBODY Fractal Humor sinpix 0 1529 Last post May 19, 2013, 12:42:32 PM
by sinpix
High tides JWildfire Gallery thargor6 0 367 Last post October 05, 2013, 02:00:57 AM
by thargor6

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.184 seconds with 24 queries. (Pretty URLs adds 0.005s, 2q)