plasma demo help please

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

  • : 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?
    :

    Just cache 0..359. Before getting a value from the array, just use abs(making the sign positive) or mod(ie. % in c) to get the previous value between 0 and 359. This will prevent access violations.
Sign In or Register to comment.

Howdy, Stranger!

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

Categories

In this Discussion