Help with drawing a simple street for a car game

giovaniluigi

Member
Joined
Jan 9, 2011
Messages
16
Programming Experience
5-10
Hi,

I'm doing an app like a car game.

I need to paint over a vector of points connected forming a line.
The paint is like a street.
Here is an example: I have a red trace that is the sight for drawing a street on it.

The origin of this red line is from GPS coordenates.

Here is a picture of what I'm talking about:

ilustration.jpg


The problem is described by the image.:cool:

I need to rotate the rectangles to follow the line.:rolleyes:

I did all using GDI+ Transformations, but this problem I don't know how to solve.

I can rotate one by one, but the more the design grows, the slower will be the application. I'm talking about thousands of points to form the line, because the code it's on the onPaint event of a picturebox.

Anyone can help me ?:confused:

Any ideas ? Please!

Thank you in advance.
 
I tried that, but because the scaleTransform I think that the line became deformated.
I need to use another thing, not the Pen to do that
 
My Attempt

Hi, I've attempted to make this and the attached image is all I can get, it's not perfect but it's not bad for a first attempt in my opinion.
I've also attached a working example.

Unfortunately it works with the curves coded in and not using the graphics curves so it'll probably be hard to make it work like that but this is as far as I can get.

If you want then I can send you the source code.
 

Attachments

  • RoadExample.png
    RoadExample.png
    141.2 KB · Views: 42
Last edited by a moderator:
Back
Top