Basic Line Drawing

Write here what nice effects or shows you have done with MADRIX or ask other users.

Moderator: MADRIX Team

Locked
milfriez
Posts: 28
Joined: Tue Apr 26, 2011 8:34 pm

Basic Line Drawing

Post by milfriez »

Im looking for an effect (built in or macro'd) that essentially just draws a straight line. With all the fancy effects, I would have thought that just a basic draw a straight line would be available.

I'm trying to configure a classy, minimal, setup. Something that does not utilize crazy colors, and pulsing. More or less just an ambient type setup for a classier type installation. Anyone have any ideas/suggestions?

Just a side note, I'm using an LED screen 15ft by 7ft tall. Just to give a point of reference as to what type of media I'm working with. The pixel pitch is only 75mm so high-res type stuff will not display that great.

Thanks.
User avatar
Wissmann
Developer
Developer
Posts: 770
Joined: Fri Feb 23, 2007 3:36 pm
Location: Germany
Contact:

Re: Basic Line Drawing

Post by Wissmann »

To draw a simple Line with the macro use the following function.
.
DrawPixelLine(color,x,y,x2,y2);
.
So for example if your matrix is about 100 by 50 pixel a line from top left to bottom right in red color looks like this.
.
DrawPixelLine(RED,0,0,99,49);
.
In Macro use this functionn in the PostRenderEffect section.
If using MAS Script use this function in the RenderEffect section.
LEDs are nothing without control ;-)
milfriez
Posts: 28
Joined: Tue Apr 26, 2011 8:34 pm

Re: Basic Line Drawing

Post by milfriez »

Thank you! I just needed a starting point. I have been reading through the documentation, but so much of it was just getting confused in my head, i just needed a good working example. From here i should be able to get what i need. As far as timing and delays and multiple lines.

Just as a suggestion, maybe in future publications, they could include more tutorials and examples of how to do basic scripting. The definitions are there in the manual, but just showing a basic script and it being compiled and executed goes a long way.

I have also noticed that this code runs some parallels to the Processing language. Are you able to create scripts using the processing language and utilize them in Madrix Script?
User avatar
Wissmann
Developer
Developer
Posts: 770
Joined: Fri Feb 23, 2007 3:36 pm
Location: Germany
Contact:

Re: Basic Line Drawing

Post by Wissmann »

OK, in theorie we would be able to implement the support for different scripting langages like Phyton, the Processing language or what else.
But in real we have not the resources for this.
.
Sorry !
LEDs are nothing without control ;-)
Locked