We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,294 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Drawing objects along (invisible) path

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.93KB
2
Contributors
3
Replies
2 Hours
Discussion Span
2 Years Ago
Last Updated
4
Views
TonyDeWittePony
Newbie Poster
2 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

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.

pritaeas
Posting Prodigy
Moderator
9,310 posts since Jul 2006
Reputation Points: 1,178
Solved Threads: 1,465
Skill Endorsements: 86

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

TonyDeWittePony
Newbie Poster
2 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

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

pritaeas
Posting Prodigy
Moderator
9,310 posts since Jul 2006
Reputation Points: 1,178
Solved Threads: 1,465
Skill Endorsements: 86

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.2961 seconds using 2.8MB