Dr Geo: A point needs to be animated over a preexisting object?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Dr Geo: A point needs to be animated over a preexisting object?

Offray
Hi,

Here comes again. Sorry I send it from a wrong address.


-------- Forwarded Message --------
Subject: Dr Geo: A point needs to be animated over a preexisting object?
Date: Mon, 21 Sep 2015 20:09:29 -0500
From: Offray Vladimir Luna Cárdenas [hidden email]
To: Any question about pharo is welcome [hidden email]


Hi,

Some of my students are exploring modeling as a tool to understand physical phenomena. In particular they're working on uniform movement. The idea is to take data from a lab experiment on uniform movement and plot it on a geometrical program and then use animation to reproduce the lab movement inside the plotting to see if they can get the analitycal expression which models the movement. The bridge between experimental data and the analytical expression is animation as a way to validate, reconstruct models. We're considering geogebra and DrGeo for this. I'm more familiar with smalltalk that with javascript, but the question we're facing is how to animate a point following a vector direction but going beyond it.

Considering the following figure:



So the idea is that A, B, C and D are points in a position versus time graph taken from the real lab experiment. "p" is a point which will follow the trajectory of the vector "u", which has the same direction of the segment that goes from A to B (it can be even overlapped) and is animated describing the red trajectory going for p to p' (which has the same x value of D, but a different y value). A way to do it will be put and invisible line that passing from A to B (and beyond) and make the point "p" move on it, but we're wondering if there is a way to just give vector direction and magnitude and make the point move, without creating an explicit line before.

Seems that nor geogebra or DrGeo can deal with animating a free object following a (vectorial described) trajectory.
Is this possible?

Cheers,

Offray


Reply | Threaded
Open this post in threaded view
|

Re: Dr Geo: A point needs to be animated over a preexisting object?

Offray
Hi again,

My students (who are school teachers) and me are testing alternative approaches: they with geogebra and I with DrGeo. What I'm doing is something like this (please open the attached file).

The points A, B, C, and D are data points taken from the real experiment. The ruler below with the big blue dot is for simulating the time. The dotted line is an ideal model of the movement and the big black dot is a mobile put on it. Now the idea is to bind the movement of the time (blue dot) to the movement of the mobile (black dot) so blue dot and black dot share the x coordinate. I will like to have two options: manual and automatic. In the first one the time ruler is handed by the user, in the second one is incremented by the computer without user intervention.

Any pointer on how to start with this will be greatly appreciated (I have seen animation examples, but they seem far advanced compared to what we need).

Cheers,

Offray



On 21/09/15 20:13, Offray Vladimir Luna Cárdenas wrote:
Hi,

Here comes again. Sorry I send it from a wrong address.


-------- Forwarded Message --------
Subject: Dr Geo: A point needs to be animated over a preexisting object?
Date: Mon, 21 Sep 2015 20:09:29 -0500
From: Offray Vladimir Luna Cárdenas [hidden email]
To: Any question about pharo is welcome [hidden email]


Hi,

Some of my students are exploring modeling as a tool to understand physical phenomena. In particular they're working on uniform movement. The idea is to take data from a lab experiment on uniform movement and plot it on a geometrical program and then use animation to reproduce the lab movement inside the plotting to see if they can get the analitycal expression which models the movement. The bridge between experimental data and the analytical expression is animation as a way to validate, reconstruct models. We're considering geogebra and DrGeo for this. I'm more familiar with smalltalk that with javascript, but the question we're facing is how to animate a point following a vector direction but going beyond it.

Considering the following figure:



So the idea is that A, B, C and D are points in a position versus time graph taken from the real lab experiment. "p" is a point which will follow the trajectory of the vector "u", which has the same direction of the segment that goes from A to B (it can be even overlapped) and is animated describing the red trajectory going for p to p' (which has the same x value of D, but a different y value). A way to do it will be put and invisible line that passing from A to B (and beyond) and make the point "p" move on it, but we're wondering if there is a way to just give vector direction and magnitude and make the point move, without creating an explicit line before.

Seems that nor geogebra or DrGeo can deal with animating a free object following a (vectorial described) trajectory.
Is this possible?

Cheers,

Offray




uniform-movement.png.png (67K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Dr Geo: A point needs to be animated over a preexisting object?

HilaireFernandes
Hi,

What is the exact relation between blue and black points? I guess it
depends on the samples.
You can build a script to constraint the black point depending on the
blue point and the direction, then embed this script on your Dr. Geo sketch.

However, Dr. Geo Smalltalk sketch[1] fit better your needs, for several
reasons:

1. you can import your data samples (100 or 1000 samples, up to you),
2. do the necessary interpolation calculus from these samples
3. build up the model using Dr. Geo Smalltalk API
4. animate with the specific #do: and #update: messages from the API

Check for documentation[2]. French version is more up to date for Dr.
Geo scripting however in your case  Dr. Geo Smalltalk sketch is well
documented in the English documentation, thanks to Edward Cherlin
contribution.

You can watch Dr. Geo TV[3] on the programming topic. I hope to produce
more step by step video tutorials on Dr. Geo programming, as the recent
ones I announced here a few days ago. However the documentation comes
with several examples easy to understand and the whole API is described.

Hilaire

[1] http://drgeo.olympe.in/doc/en/drgeo010.html
[2] http://www.drgeo.eu/community/documentation
[3] http://www.drgeo.eu/screenshot-video

Le 22/09/2015 04:05, Offray Vladimir Luna Cárdenas a écrit :
> Hi again,
>


--
Dr. Geo
http://drgeo.eu
http://google.com/+DrgeoEu



Reply | Threaded
Open this post in threaded view
|

Re: Dr Geo: A point needs to be animated over a preexisting object?

HilaireFernandes
I should write again, to avoid confusion, there are two ways for
programming in Dr. Geo:

- Dr. Geo script: with Dr. Geo UI helpers you design a Dr. Geo script
class and code its behaviour. Script instance(s) is/are plugged in an
existing geometric model. Script arguments are math objects selected
from the model. The script can do calculus and return it for other use
in the model, or it can change objects attribute (both style or math model).

- Dr. Geo Smalltalk sketch are sketch entirely programmed with the
dedicated Dr. Geo API. It gives access to unique object and helpers as
the plugged point defined with block closure (i.e. the one use on the
recursive sequence examples), the plotter, the rulers. Adding new one is
in the reach of the user.

Hilaire

Le 22/09/2015 10:15, Hilaire a écrit :

> Hi,
>
> What is the exact relation between blue and black points? I guess it
> depends on the samples.
> You can build a script to constraint the black point depending on the
> blue point and the direction, then embed this script on your Dr. Geo sketch.
>
> However, Dr. Geo Smalltalk sketch[1] fit better your needs, for several
> reasons:
>
> 1. you can import your data samples (100 or 1000 samples, up to you),
> 2. do the necessary interpolation calculus from these samples
> 3. build up the model using Dr. Geo Smalltalk API
> 4. animate with the specific #do: and #update: messages from the API
>
> Check for documentation[2]. French version is more up to date for Dr.
> Geo scripting however in your case  Dr. Geo Smalltalk sketch is well
> documented in the English documentation, thanks to Edward Cherlin
> contribution.
>
> You can watch Dr. Geo TV[3] on the programming topic. I hope to produce
> more step by step video tutorials on Dr. Geo programming, as the recent
> ones I announced here a few days ago. However the documentation comes
> with several examples easy to understand and the whole API is described.
>
> Hilaire
>
> [1] http://drgeo.olympe.in/doc/en/drgeo010.html
> [2] http://www.drgeo.eu/community/documentation
> [3] http://www.drgeo.eu/screenshot-video
>
> Le 22/09/2015 04:05, Offray Vladimir Luna Cárdenas a écrit :
>> Hi again,
>>
>


--
Dr. Geo
http://drgeo.eu
http://google.com/+DrgeoEu



Reply | Threaded
Open this post in threaded view
|

Re: Dr Geo: A point needs to be animated over a preexisting object?

Offray
Hi Hilaire,

Thanks for your clarifications and pointers to documentation. More
comments below

On 22/09/15 03:41, Hilaire wrote:

> I should write again, to avoid confusion, there are two ways for
> programming in Dr. Geo:
>
> - Dr. Geo script: with Dr. Geo UI helpers you design a Dr. Geo script
> class and code its behaviour. Script instance(s) is/are plugged in an
> existing geometric model. Script arguments are math objects selected
> from the model. The script can do calculus and return it for other use
> in the model, or it can change objects attribute (both style or math model).
>
> - Dr. Geo Smalltalk sketch are sketch entirely programmed with the
> dedicated Dr. Geo API. It gives access to unique object and helpers as
> the plugged point defined with block closure (i.e. the one use on the
> recursive sequence examples), the plotter, the rulers. Adding new one is
> in the reach of the user.

We would like to combine both in some sense (thats kind of what geogebra
does). For example we would like start by drawing points like the ones
in [1] in a canvas, and then program a script which binds two points
making them to share its x coordinate and update the canvas where they
were drawn when I move a ruler. Is this possible?

[1] https://archive.org/details/uniform-movement.png

By the way, I was making some minor annotations to the docs you shared
via hypothesis[2]. You can find them at [3]

[2] https://hypothes.is/
[3] https://via.hypothes.is/http://drgeo.olympe.in/doc/en/drgeo010.html

Cheers,

Offray



Reply | Threaded
Open this post in threaded view
|

Re: Dr Geo: A point needs to be animated over a preexisting object?

HilaireFernandes
Le 24/09/2015 16:13, Offray Vladimir Luna Cárdenas a écrit :
> We would like to combine both in some sense (thats kind of what
> geogebra does). For example we would like start by drawing points like
> the ones in [1] in a canvas, and then program a script which binds two
> points making them to share its x coordinate and update the canvas
> where they were drawn when I move a ruler. Is this possible?

Yes, in that case you use Dr. Geo script.

But again, Dr. Geo Smalltalk sketch fit better your situation, as you
described it. If you have 100 samples, you will have to use 100 times
the same script in a the mouse environment, tedious.

Hilaire

--
Dr. Geo
http://drgeo.eu
http://google.com/+DrgeoEu



Reply | Threaded
Open this post in threaded view
|

Re: Dr Geo: A point needs to be animated over a preexisting object?

Offray
Thanks Hilare,

My students have choosen Geogebra for their work. Mainly because of the
many videos and the ability to mix scripting with graphical interface
like shown in [1] and the use of spread sheet view in the interface [2],
which is closer to what they want to do with their students.

[1] https://www.youtube.com/watch?v=Wwtv2aZwf4s
[2] https://www.youtube.com/watch?v=VtYdHTNwjmU

May be these videos and interface could help in cross-pollination of
ideas for Dr Geo.

Cheers,

Offray


On 25/09/15 05:08, Hilaire wrote:

> Le 24/09/2015 16:13, Offray Vladimir Luna Cárdenas a écrit :
>> We would like to combine both in some sense (thats kind of what
>> geogebra does). For example we would like start by drawing points like
>> the ones in [1] in a canvas, and then program a script which binds two
>> points making them to share its x coordinate and update the canvas
>> where they were drawn when I move a ruler. Is this possible?
> Yes, in that case you use Dr. Geo script.
>
> But again, Dr. Geo Smalltalk sketch fit better your situation, as you
> described it. If you have 100 samples, you will have to use 100 times
> the same script in a the mouse environment, tedious.
>
> Hilaire
>


Reply | Threaded
Open this post in threaded view
|

Re: Dr Geo: A point needs to be animated over a preexisting object?

philippeback
My wife is a maths teacher and they do Geogebra too.

Tried to get her on DrGeo, still not won but we'll get there.

What is a key differentiator of DrGeo ?

Phil

On Fri, Sep 25, 2015 at 2:21 PM, Offray Vladimir Luna Cárdenas <[hidden email]> wrote:
Thanks Hilare,

My students have choosen Geogebra for their work. Mainly because of the many videos and the ability to mix scripting with graphical interface like shown in [1] and the use of spread sheet view in the interface [2], which is closer to what they want to do with their students.

[1] https://www.youtube.com/watch?v=Wwtv2aZwf4s
[2] https://www.youtube.com/watch?v=VtYdHTNwjmU

May be these videos and interface could help in cross-pollination of ideas for Dr Geo.

Cheers,

Offray


On 25/09/15 05:08, Hilaire wrote:
Le 24/09/2015 16:13, Offray Vladimir Luna Cárdenas a écrit :
We would like to combine both in some sense (thats kind of what
geogebra does). For example we would like start by drawing points like
the ones in [1] in a canvas, and then program a script which binds two
points making them to share its x coordinate and update the canvas
where they were drawn when I move a ruler. Is this possible?
Yes, in that case you use Dr. Geo script.

But again, Dr. Geo Smalltalk sketch fit better your situation, as you
described it. If you have 100 samples, you will have to use 100 times
the same script in a the mouse environment, tedious.

Hilaire





Reply | Threaded
Open this post in threaded view
|

Re: Dr Geo: A point needs to be animated over a preexisting object?

HilaireFernandes
Le 25/09/2015 14:32, [hidden email] a écrit :
> My wife is a maths teacher and they do Geogebra too.
>
> Tried to get her on DrGeo, still not won but we'll get there.
>
> What is a key differentiator of DrGeo ?

The main difference is philosophical: Dr. Geo is an open box, Geogebra a
close box.
Dr. Geo is a mustang car you may want to mix in.
Geogebra is a bmw car you don't want to mix in.

Of course the analogy is over simplified.

Hilaire

--
Dr. Geo
http://drgeo.eu
http://google.com/+DrgeoEu



Reply | Threaded
Open this post in threaded view
|

Re: Dr Geo: A point needs to be animated over a preexisting object?

HilaireFernandes
In reply to this post by Offray
You refer to something else but scripting.

Ideas are cheap, implementations are expensive, so if there are no more
coder behind Dr. Geo but me, cheap ideas will not get there quickly. So
in between I will stick to the hacking open mustang model (i.e. Dr. Geo
Smalltalk sketch and Dr. Geo scripting)

Hilaire

Le 25/09/2015 14:21, Offray Vladimir Luna Cárdenas a écrit :

> Thanks Hilare,
>
> My students have choosen Geogebra for their work. Mainly because of
> the many videos and the ability to mix scripting with graphical
> interface like shown in [1] and the use of spread sheet view in the
> interface [2], which is closer to what they want to do with their
> students.
>
> [1] https://www.youtube.com/watch?v=Wwtv2aZwf4s
> [2] https://www.youtube.com/watch?v=VtYdHTNwjmU
>
> May be these videos and interface could help in cross-pollination of
> ideas for Dr Geo.
>
> Cheers,
>
> Offray
>
>
> On 25/09/15 05:08, Hilaire wrote:
>> Le 24/09/2015 16:13, Offray Vladimir Luna Cárdenas a écrit :
>>> We would like to combine both in some sense (thats kind of what
>>> geogebra does). For example we would like start by drawing points like
>>> the ones in [1] in a canvas, and then program a script which binds two
>>> points making them to share its x coordinate and update the canvas
>>> where they were drawn when I move a ruler. Is this possible?
>> Yes, in that case you use Dr. Geo script.
>>
>> But again, Dr. Geo Smalltalk sketch fit better your situation, as you
>> described it. If you have 100 samples, you will have to use 100 times
>> the same script in a the mouse environment, tedious.
>>
>> Hilaire
>>
>
>
>


--
Dr. Geo
http://drgeo.eu
http://google.com/+DrgeoEu



Reply | Threaded
Open this post in threaded view
|

Re: Dr Geo: A point needs to be animated over a preexisting object?

philippeback
Keep the good examples coming!

On Fri, Sep 25, 2015 at 3:03 PM, Hilaire <[hidden email]> wrote:
You refer to something else but scripting.

Ideas are cheap, implementations are expensive, so if there are no more
coder behind Dr. Geo but me, cheap ideas will not get there quickly. So
in between I will stick to the hacking open mustang model (i.e. Dr. Geo
Smalltalk sketch and Dr. Geo scripting)

Hilaire

Le 25/09/2015 14:21, Offray Vladimir Luna Cárdenas a écrit :
> Thanks Hilare,
>
> My students have choosen Geogebra for their work. Mainly because of
> the many videos and the ability to mix scripting with graphical
> interface like shown in [1] and the use of spread sheet view in the
> interface [2], which is closer to what they want to do with their
> students.
>
> [1] https://www.youtube.com/watch?v=Wwtv2aZwf4s
> [2] https://www.youtube.com/watch?v=VtYdHTNwjmU
>
> May be these videos and interface could help in cross-pollination of
> ideas for Dr Geo.
>
> Cheers,
>
> Offray
>
>
> On 25/09/15 05:08, Hilaire wrote:
>> Le 24/09/2015 16:13, Offray Vladimir Luna Cárdenas a écrit :
>>> We would like to combine both in some sense (thats kind of what
>>> geogebra does). For example we would like start by drawing points like
>>> the ones in [1] in a canvas, and then program a script which binds two
>>> points making them to share its x coordinate and update the canvas
>>> where they were drawn when I move a ruler. Is this possible?
>> Yes, in that case you use Dr. Geo script.
>>
>> But again, Dr. Geo Smalltalk sketch fit better your situation, as you
>> described it. If you have 100 samples, you will have to use 100 times
>> the same script in a the mouse environment, tedious.
>>
>> Hilaire
>>
>
>
>


--
Dr. Geo
http://drgeo.eu
http://google.com/+DrgeoEu





Reply | Threaded
Open this post in threaded view
|

Re: Dr Geo: A point needs to be animated over a preexisting object?

HilaireFernandes
Le 25/09/2015 15:26, [hidden email] a écrit :
> Keep the good examples coming!
>
And regarding the asked challenge, a step by step tutorial example to
constrain one point ordinate to another point ordinate.

https://plus.google.com/+DrgeoEu/posts/gVBwYFMHdgp

Hilaire

--
Dr. Geo
http://drgeo.eu
http://google.com/+DrgeoEu



Reply | Threaded
Open this post in threaded view
|

Re: Dr Geo: A point needs to be animated over a preexisting object?

Offray
In reply to this post by HilaireFernandes


On 25/09/15 08:03, Hilaire wrote:
> You refer to something else but scripting.
>
> Ideas are cheap, implementations are expensive, so if there are no more
> coder behind Dr. Geo but me, cheap ideas will not get there quickly. So
> in between I will stick to the hacking open mustang model (i.e. Dr. Geo
> Smalltalk sketch and Dr. Geo scripting)
>
> Hilaire

Well, In fact I refer to something related with scripting and is the
possibility to add scripting behavior to a particular object which was
previously drawn in the canvas (similar to what Etoys, Scratch or
Geogebra do). I share your commitment to the open mustang model, but my
students don't. So they look for features like sriptable objects which
were drawn on canvas first. Is a feature that could be useful on
spreading the adoption of Dr Geo, so more people can enjoy the open
mustang. I also share that that ideas are cheap and implementation is
difficult and I know that this is a small community with solo projects
(like mine) which has very powerful implementations like Dr. Geo. I hope
to make a constructive comment on possible features, not any pressure or
nonconstructive critique on Dr Geo development.

Cheers and thanks for the last video.

Offray



> Le 25/09/2015 14:21, Offray Vladimir Luna Cárdenas a écrit :
>> Thanks Hilare,
>>
>> My students have choosen Geogebra for their work. Mainly because of
>> the many videos and the ability to mix scripting with graphical
>> interface like shown in [1] and the use of spread sheet view in the
>> interface [2], which is closer to what they want to do with their
>> students.
>>
>> [1] https://www.youtube.com/watch?v=Wwtv2aZwf4s
>> [2] https://www.youtube.com/watch?v=VtYdHTNwjmU
>>
>> May be these videos and interface could help in cross-pollination of
>> ideas for Dr Geo.
>>
>> Cheers,
>>
>> Offray
>>
>>
>> On 25/09/15 05:08, Hilaire wrote:
>>> Le 24/09/2015 16:13, Offray Vladimir Luna Cárdenas a écrit :
>>>> We would like to combine both in some sense (thats kind of what
>>>> geogebra does). For example we would like start by drawing points like
>>>> the ones in [1] in a canvas, and then program a script which binds two
>>>> points making them to share its x coordinate and update the canvas
>>>> where they were drawn when I move a ruler. Is this possible?
>>> Yes, in that case you use Dr. Geo script.
>>>
>>> But again, Dr. Geo Smalltalk sketch fit better your situation, as you
>>> described it. If you have 100 samples, you will have to use 100 times
>>> the same script in a the mouse environment, tedious.
>>>
>>> Hilaire
>>>
>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: Dr Geo: A point needs to be animated over a preexisting object?

HilaireFernandes
Le 26/09/2015 16:42, Offray Vladimir Luna Cárdenas a écrit :
Well, In fact I refer to something related with scripting and is the possibility to add scripting behavior to a particular object which was previously drawn in the canvas (similar to what Etoys, Scratch or Geogebra do). I share your commitment to the open mustang model, but
The referenced Geogebra videos show parametrized sliders, I don't see scripting (i.e piece of code plugged in the canvas).
Now the Dr.Geo script feature is really "
to add scripting behaviour to a particular object which was previously drawn in the canvas". Did you really take a look to this Dr. Geo feature?

It is likely you were looking for something different, although re-reading your email I think I got your question right.

Anyway, never mind.

Hilaire
-- 
Dr. Geo
http://drgeo.eu
http://google.com/+DrgeoEu
Reply | Threaded
Open this post in threaded view
|

Re: Dr Geo: A point needs to be animated over a preexisting object?

Offray
Hi,

On 26/09/15 09:56, Hilaire wrote:
Le 26/09/2015 16:42, Offray Vladimir Luna Cárdenas a écrit :
Well, In fact I refer to something related with scripting and is the possibility to add scripting behavior to a particular object which was previously drawn in the canvas (similar to what Etoys, Scratch or Geogebra do). I share your commitment to the open mustang model, but
The referenced Geogebra videos show parametrized sliders, I don't see scripting (i.e piece of code plugged in the canvas).


Well minute 5:12 and 11:40 of the first video show explicitly sliders *and* scripting. But the piece of code is not plugged to the canvas, but to a particular object in the canvas (in this case to and slider).

Now the Dr.Geo script feature is really "to add scripting behaviour to a particular object which was previously drawn in the canvas". Did you really take a look to this Dr. Geo feature?


I tried to, but didn't find how to start with a drawn object a put a particular behavior onto this *specific* object. Scripting, in my finding, was related with any selected kind of object (two points, a line, etc) and made them behave accordingly to the script, so it was not to a particular selected object which can take or send messages to others in the same canvas (like in Geogebra, Etoys or Scratch).

It is likely you were looking for something different, although re-reading your email I think I got your question right.

Anyway, never mind.


Ok. Never mind then.

Offray
Reply | Threaded
Open this post in threaded view
|

Re: Dr Geo: A point needs to be animated over a preexisting object?

HilaireFernandes
Le 26/09/2015 17:24, Offray Vladimir Luna Cárdenas a écrit :
> I tried to, but didn't find how to start with a drawn object a put a
> particular behavior onto this *specific* object. Scripting, in my
> finding, was related with any selected kind of object (two points, a
> line, etc) and made them behave accordingly to the script, so it was
> not to a particular selected object which can take or send messages to
> others in the same canvas (like in Geogebra, Etoys or Scratch).

A script in DrGeo is a first class citizen (i.e. a Smalltalk class) you
can use several time on different objects. Therefore, the script
instance can hold states with its attributes.
A script is mostly like any other math object model in Dr. Geo.

Hilaire

--
Dr. Geo
http://drgeo.eu
http://google.com/+DrgeoEu