Re: JSUI-MGraphics patch-a-day

Forums > Javascript > JSUI-MGraphics patch-a-day
November 29, 2011 | 5:58 pm

Here is the patch for November 29, 2011:

Using the transform(), translate(), rotate() and scale() functions give us the ability to do some complex graphical drawing that would otherwise require altogether too much math to consider. In this one, we use these function to create a tilted three-planet orbit display on a pretty blue background.

Oh, and we also pipe the output to a Jitter matrix! In order to do this, we use the push_group() and pop_group() functions to create a working area for the drawing, produce an image from the result, then display the output in both the JSUI drawing area and output it as a matrix. The translation (from mgraphics to Jitter matrix) isn’t perfect, but it gives us the ability to do a lot with the result.

EDIT: Garf – Joshua pointed out that I didn’t have the interp option set up anywhere in my Jitter stream, which caused the problems with Jitter display. In this updated version, I’ve simply set the interp option of the jit.pwindow, but you could choose to do that anywhere along the way if you chose…



Subscribe to the Cycling '74 Weekly Newsletter

Let us tell you about notable Max projects, obscure facts, and creative media artists of all kinds.

* indicates required