Howdy, Stranger!

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

Categories

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

  • Josh CodeJosh Code Member Posts: 675
    : 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.
  • Andre YoungAndre Young USAMember Posts: 0

    ________ / http://forcoder.org / free video tutorials and ebooks about < Swift Visual Basic Delphi Perl MATLAB C Objective-C PL/SQL Go PHP Ruby Assembly R Visual Basic .NET Python Scratch C++ C# JavaScript Java Hack COBOL ML Logo Awk Ada Erlang Lisp Fortran ABAP Transact-SQL Julia VBScript Lua Bash Prolog Apex Alice FoxPro Dart SAS LabVIEW Clojure F# Scala Crystal Kotlin Rust Scheme D /> ______________

Sign In or Register to comment.