Hallo,
(note: pd-announce is not meant for discussion, only for announcements)
Kutsal K. Bilgin hat gesagt: // Kutsal K. Bilgin wrote:
i have an array of size 360 and the values are either 1 or 0. each of these values represent a degree in a 360 degree circle and if the value is 1 for a particular index, i want to draw a little filled circle (o point) at that degree on the main circle..
the problem is i don't know how to create loops as i would do when writing in opengl, i need to create a loop to scan all the values in the array and take the actions according to the values...
The trick here is to "multiply" a GemList sent from the gemhead several times, using for example the [repeat] object or a counter driven by [until]. To read from a table, a counter is better.
To read out a table of length 100, you start a counter from 0-99 on every gemhead-output. Then use this to generate proper messages for the things you want to render. The rendering then has to be adapted as well. [any] from IEMlib and Gem's seperator play a crucial role here. You store the current gemstate in a [any]-object, then use the messages you generated from about to repeatedly send this stored gemstate to a [seperator] after which you do some transformations according to your needs.
I think, this is harder to explain in words for me that to just show an example as attached. The [any]/[seperator] stuff is in [pd painter]
I used a [gemhead 45] inside [pd painter] to make this gemhead render before the gemhead, that is used to drive the counter.
Frank Barknecht _ ______footils.org_ __goto10.org__