Home > Archive > Java Help > May 2006 > dynamic drawing in web page
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
dynamic drawing in web page
|
|
| barbaros 2006-05-21, 7:09 pm |
| 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
| |
|
|
"barbaros" <barbaros@ptmat.fc.ul.pt> wrote in message
news:1148245752.728480.238540@u72g2000cwu.googlegroups.com...
> 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.
--
Rhino
| |
| Roedy Green 2006-05-23, 7:08 pm |
| On 21 May 2006 14:09:12 -0700, "barbaros" <barbaros@ptmat.fc.ul.pt>
wrote, quoted or indirectly quoted someone who said :
>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
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
| |
| jmdeschamps@gmail.com 2006-05-23, 7:08 pm |
| barbaros wrote:
> 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
|
|
|
|
|