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

daydreamer

  • Member
  • ****
  • Posts: 913
  • watch Chebyshev on the backside of the Moon
Re: idea of demo based on rosler attractor
« Reply #60 on: January 27, 2019, 09:34:51 AM »
HSE 500000points,I think its way too much when zoomed so it becomes many big spheres,so I decided to try code sort them to inside xyzc box and other things
xyzc box lets me control sort size of spheres cant get too big and many min size only pixels
and inspired by unicode flags in other thread of course we must have a flag
Code: [Select]
.data
align 16
scale1  real4 255.0,255.0,255.0,255.0
RGBA    real4 0.0,0.0,0.0,0.0,0.0
CMYK    real4 0.0,0.0,0.0,0.0,0.0
scale2  real4 0.01,0.01,0.01,0.01
ones    real4 1.0,1.0,1.0,1.0,1.0
.code

PROC CMYKtoRGB
movaps xmm0,CMYK
mulps xmm0,scale2
movaps xmm1,ones
movss xmm2,k
shufps xmm2,xmm2,copytoall ;k,k,k,k
mulps xmm0,scale1
subps xmm1,xmm0
mulps xmm1,xmm2
ret
ENDP

;wrote it in mind to be able to zoom in on attractor,at the same time clip z to not waste system resources draw lots of tiny points and not
;have too close/big objects that both take system resources and fill up the whole screen
PROC CLIPBOX
;ebx=adress of pointbuffer for drawing on screen
movaps xmm0,xyzc ;points
subps xmm0,minxyzc
cmpltps xmm0,maxboxxyzc ;4 less than compares,less than=0FFFFFFFFh,max c=very high number, C could also represent a texturenumber
MOVHLPS xmm1,xmm0
andps xmm1,xmm0 ; perform .IF xy< and zc<
movaps xmm1,xmm0
 PSLLQ xmm0,32
andss xmm0,xmm1                    ;increment and copy if inside screen
andss xmm0,increment ;if not inside xyzbox ,increment becomes zero= no copy
movd eax,xmm0
.IF eax!=0
movaps xmm0,xyzc
movaps [EBX]
add ebx,eax
.ENDIF

ret
ENDP


PROC flag
mov eax,XY ;x and y simultanously 256*256 coordinates
and eax,0f0f0h ;must experiment to get right thickness of cross in middle of flag
mov ebx,blue ;ebx =color
.IF al=127 or ah=127 ;horizontal and vertical check if middle of flag
mov ebx,yellow
.ENDIF
ret
ENDP
« Last Edit: February 07, 2019, 01:30:24 PM by daydreamer »
Quote from Flashdance
Nick  :  When you give up your dream, you die
*wears a flameproof asbestos suit*
Gone serverside programming p:  :D

HSE

  • Member
  • *****
  • Posts: 1110
  • <AMD>< 7-32>
Re: idea of demo based on rosler attractor
« Reply #61 on: January 27, 2019, 11:07:37 AM »
OK. Your Christmas ball is an square Sweden flag.

What is CMYK?

guga

  • Member
  • *****
  • Posts: 1043
  • Assembly is a state of art.
    • RosAsm
Re: idea of demo based on rosler attractor
« Reply #62 on: January 27, 2019, 12:36:34 PM »
Hi HSE

CMYK is a colorspace model. It stands for cyan, magenta, yellow and black.  His CMYK to RGB converts the CMYK color space to RGB colors.

https://en.wikipedia.org/wiki/CMYK_color_model


Btw, Daydreamer.

I liked the way you did with SSE. Maybe you could give me a help later trying to adapt my CieLCH using SSE as well to make it faster ?
Coding in Assembly requires a mix of:
80% of brain, passion, intuition, creativity
10% of programming skills
10% of alcoholic levels in your blood.

My Code Sites:
http://rosasm.freeforums.org
http://winasm.tripod.com

daydreamer

  • Member
  • ****
  • Posts: 913
  • watch Chebyshev on the backside of the Moon
Re: idea of demo based on rosler attractor
« Reply #63 on: January 28, 2019, 01:06:19 AM »
Btw, Daydreamer.

I liked the way you did with SSE. Maybe you could give me a help later trying to adapt my CieLCH using SSE as well to make it faster ?
thanks
I started with simplest colorspace conversion first,going to try help you as time permits

@HSE
everything looks better with textures,some textures take more time to code
PROC flag can be used both with 2d coordinates to be used only with 2d bitmap and be used for texture coordinates

Quote from Flashdance
Nick  :  When you give up your dream, you die
*wears a flameproof asbestos suit*
Gone serverside programming p:  :D

guga

  • Member
  • *****
  • Posts: 1043
  • Assembly is a state of art.
    • RosAsm
Re: idea of demo based on rosler attractor
« Reply #64 on: January 28, 2019, 04:10:08 AM »
Many Tks, daydreamer  :t

I´m finishing the implementation on the backwards operation "CieLCHtoRGB" and see if i can be able to optim9ize what i can before posting it here for us to give a try on SSE.  I suceeded to make usage on the matrix tables to make the conversion faster between the different colorspaces such as Adobe RGB 1998, SECAM etc etc.

I´m using predefined tables for make it goes faster since the function makes heavy use of gamma and white reference values. The maths envolved is a bit hard, but maybe it can be simplified before optimize it further. Plus, with the help of the adaptation transformations we can create tons of different models to use on a single function RGBtoCieLCH and it´s reverse CieLCHtoRGB.

Doing my best here to make it complete as possible and yet fast enought to allow the function to be used in video editing as well and not only image processing :bgrin: :bgrin: :bgrin:

I´m pretty sure, after the code is cleaned it can be optimized further. For example, using a faster way to compute sin, cosine and atan2 operations necessary for CieLCH operations. Siekmanski found a good library that may can be used here: http://masm32.com/board/index.php?topic=4118.120  and http://lolengine.net/wiki/doc/maths/remez
« Last Edit: January 28, 2019, 07:39:21 AM by guga »
Coding in Assembly requires a mix of:
80% of brain, passion, intuition, creativity
10% of programming skills
10% of alcoholic levels in your blood.

My Code Sites:
http://rosasm.freeforums.org
http://winasm.tripod.com

daydreamer

  • Member
  • ****
  • Posts: 913
  • watch Chebyshev on the backside of the Moon
Re: idea of demo based on rosler attractor
« Reply #65 on: May 12, 2019, 04:52:53 AM »
seem aizawa are similar to this simulation
https://www.iter.org/newsline/188/844
Quote from Flashdance
Nick  :  When you give up your dream, you die
*wears a flameproof asbestos suit*
Gone serverside programming p:  :D