Search Tutorials
I have multiplied by several factors to make it easy to increment the sin wave, and to make the wave flow as I have desired. By incrementing the variable youstarted with, you can actually make the sin wave move, in a whipping fashion. This is essentially the same as drawning only part of the sin wave and moving the viewable region along the graph. At this point you should have a very impressive sin wave. To add depth, you could simply use cosine (abbreviated cos), which has the property of being -1 to 1, but starts off and disaligns the sin function. In essence, when sin is 0, cos is either -1 or 1. This is perfect for distance perception, if you are trying to get the cylindrical effect of DNA as we currently are. All you have to do is scale the balls, using cos(someStartValue + x * PI/180), the exact parameter you sent to sin! If you don't know how to do the flash behind this theory, look at my source, and LOL have fun changing numbers, that's always kewl. For dynamicability, if that's even a word, I didn't use proper radians in my parameter, so the DNA strands go in and out of sync, which I thought looked pretty kewl. Hope this reveals some of the mysteries of how simple most DNA graphics are!
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|