dynamic drawing in web page

B

barbaros

Hello everybody,

I need to put some dynamic drawings on my web page. More precisely, I
need to draw a number of geometric figures (circles, rectangles) which
evolve into a graphics windows according to some law (a little bit like
the solar system). I need also to have several fields aside the window,
where the visitor can change values for several significant parameters
(like the mass of each body).

Could you please suggest a solution (preferably not involving hundreds
of lines of code) ? The computations should be performed on the client
machine.

Thank you. Cristian Barbarosie http://cmaf.fc.ul.pt/~barbaros
 
R

Rhino

barbaros said:
Hello everybody,

I need to put some dynamic drawings on my web page. More precisely, I
need to draw a number of geometric figures (circles, rectangles) which
evolve into a graphics windows according to some law (a little bit like
the solar system). I need also to have several fields aside the window,
where the visitor can change values for several significant parameters
(like the mass of each body).

Could you please suggest a solution (preferably not involving hundreds
of lines of code) ? The computations should be performed on the client
machine.

Basically, it sounds like you're talking about writing an applet. An applet
is a Java program that sits on a web page. You can write an applet so that
it draws circles, arcs, etc. and you can give the user the ability to
interact with an applet.

If you look at the sample applets that Sun has written for Java -
http://java.sun.com/applets/jdk/1.4/index.html -
you'll see that a few applets are doing at least some of what you want to
do. Each example includes source code so that you can get a rough idea of
how much code is necessary to do what you want.

In your case, you might want a single applet with several distinct canvases
for drawing or a separate applet for each canvas; either way could probably
work.
 
R

Roedy Green

I need to put some dynamic drawings on my web page. More precisely, I
need to draw a number of geometric figures (circles, rectangles) which
evolve into a graphics windows according to some law (a little bit like
the solar system). I need also to have several fields aside the window,
where the visitor can change values for several significant parameters
(like the mass of each body).

have a look at the code for the http://mindprod.com/applets/bio.html

biorhthms Applet. It will show you the general framework. It may be a
bit to complicated though. Also look at
http://mindprod.com/products.html#SCREWS
 
J

jmdeschamps

barbaros said:
Hello everybody,

I need to put some dynamic drawings on my web page. More precisely, I
need to draw a number of geometric figures (circles, rectangles) which
evolve into a graphics windows according to some law (a little bit like
the solar system). I need also to have several fields aside the window,
where the visitor can change values for several significant parameters
(like the mass of each body).

Could you please suggest a solution (preferably not involving hundreds
of lines of code) ? The computations should be performed on the client
machine.

Thank you. Cristian Barbarosie http://cmaf.fc.ul.pt/~barbaros

with this you can.
http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm
It's javascript and it's not the fastest thing on earth, but it works
and its client-side...

JM
 

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

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top