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!

Recommended Answers

All 3 Replies

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.