plasma demo help - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

plasma demo help

hi folks,

i would like to write plasma demo using sin table as i have not done
something like this before. i would like to use it as a visual plugin
to my mp3 player.

i have searched all of google and have yet to find a decent tutorial
on how to write a 'sin' based plasma demo. if any of you can help that
would be great.

moving on i gather the plasma is created as a result of adding
multiple sin equations together and using that as the color index or
do 3 separate ones to get values for RGB.

my question by using the sin table sometimes the index value can be
negative (0 to 360 angle)! how do i avoid this? do i just cache the sin table with the
positive value region of sin?

thanks in advance,

kerb.

Comments

  • distortiondistortion Posts: 3Member
    : my question by using the sin table sometimes the index value can be
    : negative (0 to 360 angle)! how do i avoid this? do i just cache the
    : sin table with the positive value region of sin?

    well, I quite don't get what is the question, but anyways... the sin/cos values, as you know, are repeating fuctions... this means value sin(360) is the same as sin(0) == sin(-360)... and so on ...or -1 == 359...just mod the value by 360 and you'll get the right value... if you would like to discuss this a bit deeper (optimizations of this, whatever) just mail me [email protected]
    -Distortion

    =============
    knowledge brings FEAR

Sign In or Register to comment.