Make Grid Points From Vertices (was: Help with Make Parametric Grid Points)

Hi,

I need to calculate some grid cords and I think Make Parametric Grid Points is what I need, but I can’t figure it out how to use it.

I know cooridinates of A,B,C and D points -that are vertices of a grid. I know also that is has N and M columns and rows.

What I need is the coordinates of every grid point.

What are correct formulas I need to input in the node?

Regards
michele

michele you don’t need to input any expression into the make parametric grid if you just want a grid of points. just u for x expression and v for y expression are fine to make a point gird. adjust the u and v min and max to where you want the grid drawn. think of them as your A B C D. -1 to 1 on both u an v min and max will draw the grid fullscreen. you can then use a make points object to view the grid of points so you know where they are.

if you want a grid of lines like your drawing use the make grid lines object. then if you need access to the points of the lines use a get mesh value and you then have the position points you can render with the make points object just like with the parametric grid points. its basically the same thing. you will see this renders the line points positions in the same space as the parametric points.

 

mic.vuo (5.68 KB)

Thanks @dust. Probably I didn’t explain well. I’m not going to draw a regular grid, but a deformed one, like the one in the image I posted. This is the reason why vertex coordinates make sense.

oh you want to deform the grid by the four corners like perspective warping ? I think that requires the pro version of Vuo which I don’t have. I don’t know how to do that with parametric object, I can only draw basic objects with parametric. maybe someone else can help. its certainly possible to deform the grid with noise or to rotate it like your drawing but not sure how you would deform the grids perspective in Vuo. maybe you could build your own deformed list of positions ?

Thanks @dust again. I have Vuo Pro and I can use Warp Image with Projection Mesh. Anyway my aim is not to get a warped image, rather I wish to get the X,Y coordinates of the grid points. This is the reason I think a node like Make Parametric Grid Points could be more useful.

What about Vuo 2.4 Make Points in 2D Grid (or 3D grid)?  

I ended doing it by simply iteration. Less elegant but works. Here is cremaschi.makePointsInGridFromVertices.vuo if of any help to someone.

makePointsInGridFromVertices.zip (4.8 KB)

1 Like

Okay I see what you are trying to do now. You wanted to build the grid by defining the four corner vertices like you would with a gl quad. Bottom-left, Bottom-right, Top-left, Top-right. To me when you say vertices it means all the points in the grid not just the four corners. glad you got it sorted out, sorry I couldn’t have been of more help.

1 Like

@cremaschi, thanks for sharing your solution! And thanks @dust and @jersmi for the suggestions.

The only way I know of to do this with Make Parametric Grid Points involves building math expressions with Append Texts, so not the most straightforward, but might scale up to large numbers of points better than Process List. The key to the math expressions is the mix function, which linearly interpolates between a start point and an end point (similar to Make Points Along Line).

4-point-grid.vuo (9.68 KB)

2 Likes

Jaymie that looks exactly like what mic was asking for. I would never have figured out that expression.


I’m not great with parametric equations, I copy them from Paul Bourke’s web site.

1 Like

This problem looks solved, but instead of a new discussion… Just set out in Vuo 2.4.1 to try out the Make Points in 2D Grid for this (partly because I just think it’s a cool node) in combo with Make Points Object, but I couldn’t get this most basic comp to work – what am I missing?

 

PointGrid2D.vuo (2.54 KB)

Great stuff with the equation !

@jersmi this is some shader stuff.
When using another shader, or use Remove Texture Coordinates the grid appears.

Although I would have thought a simple unlit color would have done the job, but how shaders work technically I don’t know :)

PointGrid2D - 0.1.vuo (3.24 KB)

Awesome, @Bodysoulspirit, thank you. Which allowed me to see that the make point in grid nodes have ranges, not corner points, ok, derp.  

1 Like