Using X Y coordinates to draw

Frostmonkey's icon

This is my first/post on the forums, as I am quite new to MaxMSP. I am working on a project for a college course and have found that I need to be able to draw (like on the lcd object) but instead of using my mouse, i need it to use x y input. Is there any way this can accomplished - and if so, what is the simplest way?

Thanks!

Luke Hall's icon

Have a look at the [lcd] help file in the basic_shapes subpatch and you should soon be on your way.

If you're still not sure then you might need to read or re-read some of the first max tutorials; 9 and 10 will be particularly helpful. I was introduced to max about this time last year and I taught myself how to use it by modifying the tutorial patches to see what would happen and reading the helpfiles for the objects i encountered. good luck.

lh

Frostmonkey's icon

I have checked the help file as well as the tutorials to no avail. What I have currently is a tracking object outputting constant x and y values. I need those to values to be used to draw on a screen, thereby mimicking my tracked object.

The only item I see under the help file that may be of use to me is the "linesegment" with start and end x and y values, thought I'm not sure how I would use this with a constant flow of 1 x and 1 y value.

Luke Hall's icon

Here's a patch that should do work for you (its a bit like an etch-a-sketch!). You can even change the size of the circle. I hope it is helpful.

lh

Max Patch
Copy patch and select New From Clipboard in Max.

Frostmonkey's icon

That helped me put the pieces together :) Thank you very much!

Frostmonkey's icon

Oop, sorry to continue this but now i have a new issue. How can i export the information from a cell block with 1 cell to the x or y box in that patch?

Frostmonkey's icon

Nevermind, I've got it all working :)

Baller Black's icon

It's really interesting. How can I draw a circle on the LCD through the numerical change of XY? The process of drawing circles, not using frameoval。

Roman Thilenius's icon

a circle consist of the-first-half-of-a-cosine for X and the-second-half-of-a-cosine for Y ... or something like that :) ... just experiment with linear movements (metro->counter->...) and [cos] and you will find it.

it should also be posssible to think of a circle as four quarter circles ... where one quarter circle describes a curve of 1^2 (squared) curve.

in modern versions of max (where lcd supports float), you would create like 8 or so dots per pixel (steps of 0.125) with "setpixel". or you can use the "lineto" message.

Baller Black's icon

Thank you very much. I am a novice. Though I do not understand, I will study it.

Roman Thilenius's icon


sorry for beeing bit cryptic 。

drawing a circle into an lcd object by using arithmentics only is a quite sophisticated excercise for a novice。

however, 。t 。s poss 。ble 。

the eas 。est way t 。 draw s 。ngel p 。xels 。s pr 。 bably l 。nesegment:

[linesegment 10 20 10 20 100 100 200]

but depending on your goal, it might be easier to draw single pixels (or pixel singles) into a jitter matrix (or into a matter jitrix?)。

btw, the [scope~] helpfile can also help you to get an idea how to draw cycles using incoming movements of X nd Y values fullstop

or google " lissajous" for some fun fullstop

。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 -110



mizu's icon

playing with poltocar helpfile. Thanks Roman !
hth (myself first 。。。)
zz

Max Patch
Copy patch and select New From Clipboard in Max.


Baller Black's icon

It's amazing. Thank you.

Sebastian Rodriguez's icon

Hey,

I am pretty new to lcd and interactive visuals in max, but I am interested by this thread. I am trying to create an x/y cartesian plane that outputs two values for x & y, similar to how the real and imaginary values are output in the patch above, but on a standard cartesian plane. I picture it as a multislider object overlayed on a perpendicular multislider, and the point where the two orthogonal lines meet is the selected point in space. I plan to use the 2 values from this point (or perhaps in 3 if feasible/necessary) to influence which filter response is used, as well the cutoff/center frequency, gain, etc.

Any feedback, advice, or patches are extremely appreciated. Thanks!