Author Topic: idea of demo based on rosler attractor  (Read 3401 times)

daydreamer

  • Member
  • ****
  • Posts: 534
  • reach for the stars
idea of demo based on rosler attractor
« on: December 03, 2017, 07:36:55 AM »
Ron Thomas had very interesting fractal code+ something called rosler attractor
much of the code was 16bit, but he had a rosler pseudo3d 32bit windows code, based entirely with 64k pixels spinning around rendered with windows gdi, I saw Homer had much dx3d coding in the other forum, he had one interesting particle demo
it would be cool to make a particledemo where you can zoom,rotate the whole rosler, with small cloudparticles instead of pixel and fullfledged real 3d DirectX or opengl instead of pseudo3d,because I Think a modern computers gfx card easily can handle 64k quads that is used as particles
for those who do not know a rosler attractor looks and simulates kinda a tornado/hurricane
I dont have the time and I am not as skilled with d3d and opengl as others
I am more of oldschool coding guy
maybe siekmanski can produce that kinda code

heres a link to where you can find his stuff
http://www.ronthomas.plus.com/Downloads.html


Quote from Flashdance
Nick  :  When you give up your dream, you die.
*wears a flameproof asbestos suit*

Siekmanski

  • Member
  • *****
  • Posts: 1648
Re: idea of demo based on rosler attractor
« Reply #1 on: December 03, 2017, 04:29:33 PM »
Had a look at Wikipedia to see what the Rössler attractor is.
It caught my interest. You could do this with a point sprites particle engine in Direct3D.
No promises but when time permits, I will have a look into it.
You made any attemp yet?
Creative coders use backward thinking techniques as a strategy.

GoneFishing

  • Member
  • *****
  • Posts: 1056
  • Gone fishing
Re: idea of demo based on rosler attractor
« Reply #2 on: December 04, 2017, 09:25:04 PM »
@daydreamer2:
     Thanks  for the info about  Rossler attractor .  Once I started to learn about Chaos theory  ( inspired by forum thread about random numbers ). I have no math / physics background so all that stuff looks alien to me ... but interesting

I think that visualization of  Rossler attractor would not be that hard using OpenGl and OptiX frameworks that already have scene manipulation  facilities.

daydreamer

  • Member
  • ****
  • Posts: 534
  • reach for the stars
Re: idea of demo based on rosler attractor
« Reply #3 on: December 17, 2017, 03:45:49 AM »
@daydreamer2:
     Thanks  for the info about  Rossler attractor .  Once I started to learn about Chaos theory  ( inspired by forum thread about random numbers ). I have no math / physics background so all that stuff looks alien to me ... but interesting
this is also fun
https://en.wikipedia.org/wiki/Perlin_noise
I love SIMD stuff and look at one made a mersienne twister that produced several random numbers simultanously with SIMD code
I Think I want a to add background small valley landscape and lots of fern fractals animated as in a storm
but I Think it should be applied as texture to a sliightly curved mesh first to improve it to become more 3d

I have trouble with most old libraries and code wont work with newer windows
« Last Edit: December 25, 2017, 10:56:45 PM by daydreamer2 »
Quote from Flashdance
Nick  :  When you give up your dream, you die.
*wears a flameproof asbestos suit*

daydreamer

  • Member
  • ****
  • Posts: 534
  • reach for the stars
Re: idea of demo based on rosler attractor
« Reply #4 on: January 09, 2018, 04:37:14 AM »
Had a look at Wikipedia to see what the Rössler attractor is.
It caught my interest. You could do this with a point sprites particle engine in Direct3D.
No promises but when time permits, I will have a look into it.
You made any attemp yet?
I am trying without d3d, I dont get it to work with SSE oldschool sprites where movups gives me different colors, I have no idea what to use as scale factors now when I am not going to use the pseudo3d, but real 3d, mostly I get general protection fault or it shows nothing
might have something todo with starting with minus coordinates?
I made SSE calculation of the rosler

one thing I dont understand is,why does scientist suffice with a pseudo3d view, when you should make a real3d rotatable rosler attractor,its like having technology to photograph the hidden backside of the moon, but dont use it
Quote from Flashdance
Nick  :  When you give up your dream, you die.
*wears a flameproof asbestos suit*

Siekmanski

  • Member
  • *****
  • Posts: 1648
Re: idea of demo based on rosler attractor
« Reply #5 on: January 09, 2018, 07:52:48 AM »
Quote
I have no idea what to use as scale factors now when I am not going to use the pseudo3d, but real 3d, mostly I get general protection fault or it shows nothing

Normalize and scale the object coords within the range -1.0 to 1.0 on all 3 axis is a good start, then find the correct camera distance to get a good 3D view of the object.
Which 3D api do you use?

Quote
one thing I dont understand is,why does scientist suffice with a pseudo3d view, when you should make a real3d rotatable rosler attractor,its like having technology to photograph the hidden backside of the moon, but dont use it

Maybe because precision is their main goal.
Creative coders use backward thinking techniques as a strategy.

daydreamer

  • Member
  • ****
  • Posts: 534
  • reach for the stars
Re: idea of demo based on rosler attractor
« Reply #6 on: January 10, 2018, 11:56:53 PM »
I am still only using ddraw on my old box
I have only managed to get two different 2d rendering,xy and yx, dividing by z wont work yet, I draw one with blue beside one that alternates colors

« Last Edit: January 21, 2018, 02:15:24 AM by daydreamer2 »
Quote from Flashdance
Nick  :  When you give up your dream, you die.
*wears a flameproof asbestos suit*

caballero

  • Member
  • *****
  • Posts: 1085
    • abre ojos ensamblador
Re: idea of demo based on rosler attractor
« Reply #7 on: January 14, 2018, 05:28:31 AM »
Hi, playing a bit with an old program I made some years ago of the Lorenz attractor, I have added a little point. It isn't the Rosler attractor, but it is very similar. Quite short code. No accelerated graphic card needed :bgrin:

Full TinyC source code
En un lugar de la Mancha de cuyo nombre no quiero acordarme

- There are 10 kind of people: those who know binary numbers and those who don't -

daydreamer

  • Member
  • ****
  • Posts: 534
  • reach for the stars
Re: idea of demo based on rosler attractor
« Reply #8 on: January 14, 2018, 09:18:53 AM »
nice Lorenz Caballero :t
Quote from Flashdance
Nick  :  When you give up your dream, you die.
*wears a flameproof asbestos suit*

jj2007

  • Member
  • *****
  • Posts: 8736
  • Assembler is fun ;-)
    • MasmBasic
Re: idea of demo based on rosler attractor
« Reply #9 on: January 14, 2018, 09:58:07 AM »
Full TinyC source code

Works fine with Pelles C, too - but 50% more size. With Visual C, size is almost tripled ::)

Siekmanski

  • Member
  • *****
  • Posts: 1648
Re: idea of demo based on rosler attractor
« Reply #10 on: January 14, 2018, 10:56:12 AM »
Interesting stuff those attractors.  :t
Creative coders use backward thinking techniques as a strategy.

HSE

  • Member
  • ****
  • Posts: 809
  • <AMD>< 7-32>
Re: idea of demo based on rosler attractor
« Reply #11 on: January 14, 2018, 01:26:24 PM »
@ Alfonso!

This thing doesn't work for me;
Code: [Select]
pos= (py<<9) + (py<<7) + px;
I used other option but look inverted!

Note:
Code: [Select]
        .if edx !=0 && edx !=4 && edx!=20 && edx!=24
because you are drawing rectangles instead of spheres  :biggrin:.


File corrected and disabled vkim debug system (500 bytes smaller)
« Last Edit: January 15, 2018, 02:52:25 AM by HSE »

caballero

  • Member
  • *****
  • Posts: 1085
    • abre ojos ensamblador
Re: idea of demo based on rosler attractor
« Reply #12 on: January 14, 2018, 07:44:20 PM »
When you initialize a bitmapinfoheader you have to inform it the y-size in negative, otherwise you will see the results inverted.

In the other hand, if you use another size for your window, you should change the formula for reaching the point you want, obviously.

Quote
640 = 512 + 128

Hence:

Quote
640 * py = 512 * py + 128 * py = (py << 9) + (py << 7)

In most cases, you just need to do:

Code: [Select]
YourWidth * py + px
In modern computers you won't see the difference.

> because you are drawing rectangles instead of spheres
??


Yeah, with more vivid tones, it looks better.
En un lugar de la Mancha de cuyo nombre no quiero acordarme

- There are 10 kind of people: those who know binary numbers and those who don't -

HSE

  • Member
  • ****
  • Posts: 809
  • <AMD>< 7-32>
Re: idea of demo based on rosler attractor
« Reply #13 on: January 15, 2018, 02:23:56 AM »
Perfect now  :t

The sign was lost in translation.

I was calculating number of pixels, not positions:
Code: [Select]
    mov eax, py
    shl eax, 9
    mov ecx, py
    shl ecx, 7
    add eax, ecx
    add eax , px
    shl eax , 2        <-------- I forget this
 

caballero

  • Member
  • *****
  • Posts: 1085
    • abre ojos ensamblador
Re: idea of demo based on rosler attractor
« Reply #14 on: January 15, 2018, 05:47:29 AM »
Regarding to Rossler attractor, I have been trying to make one similar to this, without much success. I got something interesting too, but not what I was looking for. If anyone has some spare time and want to dedicate to it, it is supposed that changing the values of the global variables (initial parameters) we can get different scenarios.
En un lugar de la Mancha de cuyo nombre no quiero acordarme

- There are 10 kind of people: those who know binary numbers and those who don't -