Re: FRESH project - Supervisor Dr. A. Helmy
Henri DF <[email protected]> Tue, 20 Apr 2004 17:07:46 +0200 (CEST)
| Newsgroups | gmane.network.simulator.epfl |
|---|---|
| Message-ID | <[email protected]> |
Hello Hemen,
> Dear Henri,
>
> Thank you for the prompt reply earlier.
> Ok right now i am facing a small problem with billiards model when i am increasing the speed . The direction does not get changed if the speed is increased.
I'm not sure I understand this part. Why would you expect the direction to
change when the speed is increased?
> line:::::125
> method private new_direction = (
> (* let rad = (Random.float rnd (2. *. pi)) -. pi in
> polar 1.0 rad;*)
> if (Random.int rnd 2 = 0) then (
> let rad = pi in polar 1.0 rad)
> else (
> let rad = pi/. 2. in polar 1.0 rad )
> )
btw a minor point: the above if statement can be simply written as:
if (Random.int rnd 2 = 0) then
polar 1.0 pi
else
polar 1.0 (pi /. 2.)
> I just want the nodes to move N S E W and refelect back but when i am implementing this nodes move N-S for a vey long time and donot change direction.
It looks like you uncovered a bug ;)
I was computing the wrong lambda which was making the next direction
change be much too far ahead in time. I've attached a patch fixing this.
Please let me know if you still don't see the expected behavior with the
patch.
> Also how can i restrict the nodes to a grid like structure like you have
> done in EPFL ..could you provide me with some pointers to this.
will answer in a separate email.
henri
>
> Thanking you and awaiting your response.
>
> Sincerely,
> HEMEN R.VIMADALAL
> B.S. ELECTRONICS ENGINEERING(Mumbai University)
> M.S. ELECTRICAL ENGINEERING(U S C)
> Phone # (323)620 6279
>
>
>