looks like snowflakes
Hi all,
-- the same Fresnel as from the "compact" lens ---
Found something interesting in a math book, originally 2D , but I'm expanding it into 3D.
I wrote it first in Lisp, but as tB has an eval module , the input can be very interactive ...
It's based on irrational numbers and the patterns they create in a certain cyclus ...
the code is still in an embryonic state, and will be completed with O² ...
you can input a calculation in For I and For II -- already named are : pi , fi (the golden ratio) , e , pi2 ... but anything conform with the tB eval module will do ...
navigate with the arrow keys and PgUp / Dn ... try i.o. fi in the For I , pi ... a completely different image ...
will be updated ..
best Rob
Last edited by RobbeK; 09-10-2014 at 00:37.
looks like snowflakes
I think there are missing some Forum-sections as beta-testing and support
Thanks, René .. cool not ?
attached another one (generated by a square root)
best , Rob
using O² now ---
Arrays are still static : max iteration level = 500.000
best , Rob
Hi Rob,
I have reconfigured your program to accept dynamic or static Vectors. You can call o2Compute with a new vector/coordinate base whenever required.
Ah, many thanks Charles ....
Dim as Vector3D *cov
You declare cov as being (how-to-say) "referenced" , and then it interacts with a tB ByRef declaration ?? (i think to remember dereferencing from FB , is it similar ? )
.. I wonder it is possible to set up (in O²) a GLlist that can be recognized by tB+TBGL , here the work is almost done twice .. (in speed, much more than twice ... )
best Rob
Yes I'll have have a go, Rob.
Meanwhile, a few more tricks:
Using striding pointers instead of indexes.
Turning your zeta functions into Macros.
Passing all params to o2Compute, instead of #-sharing them.
Hi Charles,
What's the benefit of using macro's in O² , .. they are expanded / compiled inside the functions/subs (which otherwise would) calling them ?
--- what if I declare locals inside a macro , are these protected or do they belong to the scope of the function/sub where the macro ends ?
or should I not declare variables inside a macro ??
( thetaz() must remain on its own for the moment , (unlike centerX,Y,Z) .. must find something better and different than the way it acts now).
best Rob
Rob,
Macros are slightly faster, without the overhead of a function's prolog and epilog.
You may declare variables inside a macro. You may also confine the visibility of such variables, if so desired, to the inside of the macro by specifying a scope.
macro foo(a,b,c)
scope
dim long v
...
end scope
end macro
In this version, Oxygen generates the glVertex3fv list, lifting the burden from TBGL
TBGL_NewList 1
TBGL_BeginPoly %GL_POINTS
'
'will compute then pass the vertexes to Opengl
'
O2Compute cov(1),Nr_Coor,ValA,ValB
'
TBGL_EndPoly
TBGL_EndList
I also reduced the vector array from double to single precision, since this type is native to graphics cards, and I can now pass vectors in one param by reference.
Last edited by Charles Pegge; 11-10-2014 at 00:42.
Thanks Charles !!! (just what i needed ;-)
cast is new to O² ?? (had to upgrade ) -- C-style casting ??
best , Rob
Bookmarks