Hello everyone!

I have a problem, I need to draw a number of squares along a path. The drawing of the squares I should be okay with, but I was wondering if it's possible to draw them on an invisible path. That way I could calculate how "far" those squares should be on the path.

To illustrate, I made a (very basic, hehe) image of what I mean and attached it here, that should make things clearer.

I hope this is possible in PHP! Thanks a lot!

Attachments PHPPath.png 18.93 KB
7 Years
Discussion Span
Last Post by pritaeas

If your path consists of (X1,Y1)-(X2,Y2) line pairs or just all (X,Y) points then it is possible to calculate. The all point system being the easier one I guess.


How would that work in PHP? I can't find any documentation online about an (X,Y) points system.


I think I would just use an array of points. There are no ready-made functions for this, just build your own.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.