We need a fractural representation of where the 3D boxes going to live in 3D space first
so when you run this, the smaller circles x,y (centre point) will be where the 3D boxes will go in 3D space
The code is roughly put together and will be optimised, but this is how a Benice equation works
// Project: MandelBrox
// Created: 2018-02-05
// show all errors
SetErrorMode(2)
#constant width=1024
#constant height=768
// set window properties
SetWindowTitle( "MandelBrot" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
dot as integer[1000]
x1# as float
y1# as float
r1# as float
x2# as float
y2# as float
r2# as float
rsum# as float
r1# = 100
x1#=width/2
y1#=height/2
angle#=0
added=0
r2# = r1# / 2
rsum# = r1# + r2#
x2# = x1# + rsum# * cos(angle#)
y2# = y1# + rsum# * sin(angle#)
//joins.insert(x2#):joins.insert(y2#):
added=0
dots = CreateObjectBox(1,1,1)
SetObjectPosition(dots,x1#-1,y1#-1,0)
speed#=0.5
do
DrawEllipse(x1#,y1#,r1#,r1#,MakeColor(0,255,0),MakeColor(0,255,0),0)
r2# = r1# / 2
rsum# = r1# + r2#
x2# = x1# + rsum# * cos(angle#*(speed#))
y2# = y1# + rsum# * sin(angle#*(speed#))
DrawEllipse(x2#,y2#,r2#,r2#,MakeColor(0,255,0),MakeColor(0,255,0),0)
r3# = r2# / 2
rsum# = r2# + r3#
x3# = x2# + rsum# * cos(-angle#*(speed#*3))
y3# = y2# + rsum# * sin(-angle#*(speed#*3))
DrawEllipse(x3#,y3#,r3#,r3#,MakeColor(0,255,0),MakeColor(0,255,0),0)
r4# = r3# / 2
rsum# = r3# + r4#
x4# = x3# + rsum# * cos(angle#*(speed#*4))
y4# = y3# + rsum# * sin(angle#*(speed#*4))
DrawEllipse(x4#,y4#,r4#,r4#,MakeColor(0,255,0),MakeColor(0,255,0),0)
r5# = r4# / 2
rsum# = r4# + r5#
x5# = x4# + rsum# * cos(-angle#*(speed#*5))
y5# = y4# + rsum# * sin(-angle#*(speed#*5))
DrawEllipse(x5#,y5#,r5#,r5#,MakeColor(0,255,0),MakeColor(0,255,0),0)
r6# = r5# / 2
rsum# = r5# + r6#
x6# = x5# + rsum# * cos(angle#*(speed#*6))
y6# = y5# + rsum# * sin(angle#*(speed#*6))
inc angle#,1
DrawEllipse(x6#,y6#,r6#,r6#,MakeColor(0,255,0),MakeColor(0,255,0),0)
dot[added]=InstanceObject(dots)
SetObjectPosition(dot[added],x6#,y6#,y6#)
inc added
Render2DFront()
Print( ScreenFPS() )
Sync()
//sleep(1000)
loop