Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Augustin Fresnel (and his fractals)

  1. #1

    Augustin Fresnel (and his fractals)

    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
    Attached Files Attached Files
    Last edited by RobbeK; 09-10-2014 at 00:37.

  2. #2
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,527
    Rep Power
    170
    looks like snowflakes
    I think there are missing some Forum-sections as beta-testing and support

  3. #3
    Thanks, René .. cool not ?


    attached another one (generated by a square root)

    best , Rob
    Attached Files Attached Files

  4. #4
    using O² now ---

    Arrays are still static : max iteration level = 500.000


    best , Rob
    Attached Files Attached Files

  5. #5
    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.
    Attached Files Attached Files

  6. #6
    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

  7. #7
    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.
    Attached Files Attached Files

  8. #8
    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

  9. #9
    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.
    Attached Files Attached Files
    Last edited by Charles Pegge; 11-10-2014 at 00:42.

  10. #10
    Thanks Charles !!! (just what i needed ;-)

    cast is new to O² ?? (had to upgrade ) -- C-style casting ??



    best , Rob
    Attached Images Attached Images

Page 1 of 3 123 LastLast

Similar Threads

  1. Travel into 3D fractals
    By Charles Pegge in forum Shout Box Area
    Replies: 2
    Last Post: 15-06-2011, 08:40
  2. Nice fractals
    By ErosOlmi in forum Technology
    Replies: 22
    Last Post: 20-07-2007, 23:45

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •