Using Python To Change The World :)

D

dominiquevalentine

Hello, I'm a teen trying to do my part in improving the world, and me
and my pal came up with some concepts to improve the transportation
system.

I have googled up and down for examples of using python to create a
city street but I can not find any.

my objective is to replicate a section of los angeles using python,
and program the street lights and cars and whatnot. Should I be
looking towards 3D to do this?

so here is MY question:
how would you replicate a street intersection in python? and
furthermore, how would you do you have the cars move up and down those
"streets".

my question to YOU is:
can you point me in the right direction? I will search on my own, but
I would greatly appreciate any help :)

and if anyone is interested in learning more about this project (we've
got some nifty things planned), or if you wanna help, give a shout ;]
 
G

Guilherme Polo

2007/11/14 said:
Hello, I'm a teen trying to do my part in improving the world, and me
and my pal came up with some concepts to improve the transportation
system.

I have googled up and down for examples of using python to create a
city street but I can not find any.

my objective is to replicate a section of los angeles using python,
and program the street lights and cars and whatnot. Should I be
looking towards 3D to do this?

so here is MY question:
how would you replicate a street intersection in python? and
furthermore, how would you do you have the cars move up and down those
"streets".

my question to YOU is:
can you point me in the right direction? I will search on my own, but
I would greatly appreciate any help :)

and if anyone is interested in learning more about this project (we've
got some nifty things planned), or if you wanna help, give a shout ;]

It seems you are looking something to build an user interface. You
could do such thing in tkinter, for example. You would "move" cars by
redrawing them in other positions after time.

But besides doing these drawings, you will be doing a lot of math to
improve the transportation system. The drawings will be just a
representation of what you calculate, I dont see why it would be
important to do it in 3d right now.
 
D

Diez B. Roggisch

Hello, I'm a teen trying to do my part in improving the world, and me
and my pal came up with some concepts to improve the transportation
system.

I have googled up and down for examples of using python to create a
city street but I can not find any.

my objective is to replicate a section of los angeles using python,
and program the street lights and cars and whatnot. Should I be
looking towards 3D to do this?

so here is MY question:
how would you replicate a street intersection in python? and
furthermore, how would you do you have the cars move up and down those
"streets".

my question to YOU is:
can you point me in the right direction? I will search on my own, but
I would greatly appreciate any help :)

and if anyone is interested in learning more about this project (we've
got some nifty things planned), or if you wanna help, give a shout ;]

It's hard to tell you what to do with so sparse information about what you
try to accomplish in the end.

Of course if you want to have more or less realistic imaging for whatever
purpose, 3D is the way to go. If you are after traffic-simulations, it's
unneeded complexity.

Regarding the "moving cars": you can also go from simply defining paths cars
can take and parametrize these to full-blown physics - depending on what
you want.

Diez
 
M

Marc 'BlackJack' Rintsch

Hello, I'm a teen trying to do my part in improving the world, and me
and my pal came up with some concepts to improve the transportation
system.

[…]

Of course if you want to have more or less realistic imaging for whatever
purpose, 3D is the way to go. If you are after traffic-simulations, it's
unneeded complexity.

Not if their solution includes flying buses and taxis. Or this pneumatic
delivery system for people from `Futurama`. ;-)

Ciao,
Marc 'BlackJack' Rintsch
 
A

Ant

On Nov 14, 3:09 am, (e-mail address removed) wrote:
....
so here is MY question:
how would you replicate a street intersection in python? and
furthermore, how would you do you have the cars move up and down those
"streets".

I've never used it, but I'd have thought that pygame would satisfy the
graphical side of things.
 
E

Eric S. Johansson

Hello, I'm a teen trying to do my part in improving the world, and me
and my pal came up with some concepts to improve the transportation
system.

I have googled up and down for examples of using python to create a
city street but I can not find any.

http://www.gis.usu.edu/~sanduku/public_html/dissertation/outline/node23.html

"""Automobile traffic has a very extensive body of literature involving
simulation. Most people in the industrialized world deal with automobile traffic
on a daily basis, and many studies are funded annually to alleviate existing or
potential traffic problems. Several academic journals are dedicated exclusively
to automobile traffic dynamics, new textbooks on the subject are published
regularly, and the number of articles published each year dealing with
automobile traffic number in the hundreds.
"""

while they may not be in Python, I'm sure you can find modeling systems to do a
you want to do for far less effort than it would take to re-create them from
scratch.
 
S

Scott David Daniels

my objective is to replicate a section of los angeles using python,
and program the street lights and cars and whatnot. Should I be
looking towards 3D to do this?

so here is MY question:
how would you replicate a street intersection in python? and
furthermore, how would you do you have the cars move up and down those
"streets".

my question to YOU is:
can you point me in the right direction? I will search on my own, but
I would greatly appreciate any help :)

If you do want to do this in 3-D, try out VPython. More than any other
3-D system I've seen, it allows you to concentrate more on your problem,
and let it handle most of the 3-D rendering calculations as you are
learning how to use it.

-Scott David Daniels
(e-mail address removed)
 
S

scripteaze

If you do want to do this in 3-D, try out VPython. More than any other
3-D system I've seen, it allows you to concentrate more on your problem,
and let it handle most of the 3-D rendering calculations as you are
learning how to use it.

-Scott David Daniels
(e-mail address removed)

Although, i am quite the python noob, pygame would be the way to go
 
D

dominiquevalentine

It sounds as if this project is a major task based on your current level of experience. That being said, all we "pythonistas" encourage and support anyone who is trying to learn/apply python.

Break the problem into 2 parts:
--simulation math of what you're trying to do
--cool visual display (2D is sufficient) to make it interesting and so others can grasp what you did

Then the math drives the display, but you can build and test the math using text output.

pygame and pysim are good candidates. There is alsowww.vpython.org. Make sure you find some tutorial on object oriented programming "OOP" because that's the way to build this critter.

I'm assuming you have a fairly powerful PC, if so you need a decent development environment. google for python IDE or check at python.org. I use Eclipse + PyDev (both free) although there is a wide difference of opinion on IDE's.

Remember to eat the elephant one byte at a time. i.e. small steps.
-----Original Message-----
From: [email protected]
[mailto:p[email protected]]On
Behalf Of Ant
Sent: Wednesday, November 14, 2007 6:48 AM
To: (e-mail address removed)
Subject: Re: Using Python To Change The World :)
On Nov 14, 3:09 am, (e-mail address removed) wrote:
...
I've never used it, but I'd have thought that pygame would satisfy the
graphical side of things.

ah, great advice. thanks very much.

thank you to everyone for helping :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top