can I save a phun scene without menus? SOLVED
15 posts • Page 1 of 1
can I save a phun scene without menus? SOLVED
Hi there,
I am a physics teacher and a relative noob to phun. I intend to use phun to create simulations and little games for my students to explore.
Can I hide the menu's so the students cannot change the scene?
Can I show speed and distance in a textbox?
Thnaks in advance for your interest in my little questions
Martijn
I am a physics teacher and a relative noob to phun. I intend to use phun to create simulations and little games for my students to explore.
Can I hide the menu's so the students cannot change the scene?
Can I show speed and distance in a textbox?
Thnaks in advance for your interest in my little questions
Martijn
Last edited by spook1 on Tue Sep 15, 2009 7:14 am, edited 1 time in total.
- spook1
- Posts: 20
- Joined: Thu Sep 10, 2009 12:06 am
Re: can I save a phun scene without menus?
Up top, you should see file, toolbar, sim control, context menu, options, camera and hide windows. You can either click hide windows, or click on each open windows name individually. As far as i know there is no way to lock the windows like that.
-

chaff - Posts: 71
- Joined: Tue Sep 01, 2009 2:00 am
Re: can I save a phun scene without menus?
Thnaks for the fast response.
That is a pity. I was hoping that a phunlet was something like a locked simulation. Apparently it is not.
Martijn
That is a pity. I was hoping that a phunlet was something like a locked simulation. Apparently it is not.
Martijn
- spook1
- Posts: 20
- Joined: Thu Sep 10, 2009 12:06 am
Re: can I save a phun scene without menus?
Unfortunately you can not show speed or distance in a box with text without scripting. You would need to script the distance for speed and formula.
-

standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: can I save a phun scene without menus?
That is great news. Would you by accident know where I could find a scripting tutorial explaining this?
martijn
martijn
- spook1
- Posts: 20
- Joined: Thu Sep 10, 2009 12:06 am
Re: can I save a phun scene without menus?
not quite sure where you would get a specific tutorial for that, best way with the programming language in this is to start small. Theres a few tutorials on custom variables, and there a good start for thyme.
If you only want speed in one axis horizontal or vertical thats not so bad to get with script, you set a custom vairiable to store e.pos and sim.time, then check again the current e.pos and sim.time, and then just do change in distance/change in time. I might make an example script wise actually.
However there is a much simpler way than learning all that, if you just click the object you want to know the speed of, then in the context menu on the left click "information" it'll tell you the objects current information including speed. you can drag that info box away so if you close all the toolbars the information box will still be up.
If you want speed as a magnitude in any axis so moving at some angle, just use the information box. I still haven't got the hang of complex math programming in phun yet lol
If you only want speed in one axis horizontal or vertical thats not so bad to get with script, you set a custom vairiable to store e.pos and sim.time, then check again the current e.pos and sim.time, and then just do change in distance/change in time. I might make an example script wise actually.
However there is a much simpler way than learning all that, if you just click the object you want to know the speed of, then in the context menu on the left click "information" it'll tell you the objects current information including speed. you can drag that info box away so if you close all the toolbars the information box will still be up.
If you want speed as a magnitude in any axis so moving at some angle, just use the information box. I still haven't got the hang of complex math programming in phun yet lol

-

Torpedo - Posts: 120
- Joined: Mon Aug 31, 2009 8:51 pm
Re: can I save a phun scene without menus?
Ok, thanks. That is one useful option for experts.
i would like to create some game for school children where they can pick a brick (textbox on it tells its mass and friction)
The velocity of the object and the replacement should also be indicated somehow. After the student drops or slides the box, I would ahve teh information repelced by displacement and speed.
Can anyone see how to go?
martijn
i would like to create some game for school children where they can pick a brick (textbox on it tells its mass and friction)
The velocity of the object and the replacement should also be indicated somehow. After the student drops or slides the box, I would ahve teh information repelced by displacement and speed.
Can anyone see how to go?
martijn
- spook1
- Posts: 20
- Joined: Thu Sep 10, 2009 12:06 am
Re: can I save a phun scene without menus?
spook1 wrote:Ok, thanks. That is one useful option for experts.
i would like to create some game for school children where they can pick a brick (textbox on it tells its mass and friction)
The velocity of the object and the replacement should also be indicated somehow. After the student drops or slides the box, I would ahve teh information repelced by displacement and speed.
Can anyone see how to go?
martijn
Martijn,
I can see a way that you would be able to do this, you can select an object and go to it's appearance, and place the mass and friction in the box text, you can then open the options menu, go to the Visualization tab and tick the "View Velocities" checkbox, scale as you wish. After you set this up, you can bring down the console (F11 or Tilde ("~")) and type GUI.opacity = 0, to get the GUI back, type GUI.opacity = 0.8 .
I hope this is along the lines of what you want
/Grady
- gradyfitz
- Posts: 174
- Joined: Tue Sep 01, 2009 8:33 am
- Location: Victoria, Australia
Re: can I save a phun scene without menus?
Hi GradyFitz,
Thanks for your interest in my little problem.
I tried to figure it out but I did not find a "view velocities" tickbox under visualisation. Maybe I am looking in the wrong place. I use v5.28, assuming it is the latest version...
I figured that I might be able to set a variable = myscene.velocity or something like that and make that appear in a box as text. I remember a youtube tutorial where some trick like that was pulled.
I looked at some examples where an (e. property??) reoccurs time after time but I could not figure out this syntax.
presumably I need to do some math in this approach, stating v = sqrt(v_x^2 + v_y^2). Also something I would not knwo how to do in Algadoo.
I would be interested in your reflections on mine
Martijn (physics teachers educator, Netherlands)
Thanks for your interest in my little problem.
I tried to figure it out but I did not find a "view velocities" tickbox under visualisation. Maybe I am looking in the wrong place. I use v5.28, assuming it is the latest version...
I figured that I might be able to set a variable = myscene.velocity or something like that and make that appear in a box as text. I remember a youtube tutorial where some trick like that was pulled.
I looked at some examples where an (e. property??) reoccurs time after time but I could not figure out this syntax.
presumably I need to do some math in this approach, stating v = sqrt(v_x^2 + v_y^2). Also something I would not knwo how to do in Algadoo.
I would be interested in your reflections on mine
Martijn (physics teachers educator, Netherlands)
- spook1
- Posts: 20
- Joined: Thu Sep 10, 2009 12:06 am
Re: can I save a phun scene without menus?
Are you useing Algodoo Phun edition or the full version of Algodoo??
-

Versieon - Posts: 375
- Joined: Tue Sep 01, 2009 4:45 pm
Re: can I save a phun scene without menus?
I did not pay, so I suppose I use phun..?
- spook1
- Posts: 20
- Joined: Thu Sep 10, 2009 12:06 am
Re: can I save a phun scene without menus?
Well there's your problem there, then. The velocities menu is only existent in the full 29.00 Euro release version of Algodoo.
Due to the fact you're only using Phun v5.28, you're going to need a lot of scripting to get to where you want, unfortunately.
Due to the fact you're only using Phun v5.28, you're going to need a lot of scripting to get to where you want, unfortunately.
-

Fujitsu - Posts: 328
- Joined: Tue Sep 01, 2009 12:28 am
- Location: Canada
Re: can I save a phun scene without menus?
thanks a lot. I'll purchase algodoo immediately
Martijn
Martijn
- spook1
- Posts: 20
- Joined: Thu Sep 10, 2009 12:06 am
Re: can I save a phun scene without menus?
spook1 wrote:Hi GradyFitz,
Thanks for your interest in my little problem.
I tried to figure it out but I did not find a "view velocities" tickbox under visualisation. Maybe I am looking in the wrong place. I use v5.28, assuming it is the latest version...
I figured that I might be able to set a variable = myscene.velocity or something like that and make that appear in a box as text. I remember a youtube tutorial where some trick like that was pulled.
I looked at some examples where an (e. property??) reoccurs time after time but I could not figure out this syntax.
presumably I need to do some math in this approach, stating v = sqrt(v_x^2 + v_y^2). Also something I would not knwo how to do in Algadoo.
I would be interested in your reflections on mine
Martijn (physics teachers educator, Netherlands)
Well, "view velocities" is a check box in the latest version of Algodoo (1.6.0).
But, it is still possible in beta 5.28, though, can be inaccurate.
1. Create a circle and a box on the object you want the estimated velocity of (give them a bit of overlap).
2. Add a centre hinge on the box and circle.
3. Apply a motor on the hinge of the box, give it +inf strength and 600 rpm properties.
4. In the console (F11 or Tilde("~")) place the code:
- Code: Select all
Scene.my.Velocity = [0,0];Scene.my.Position = [0,0]
In the script menu of the box (in the onCollide property), place the code:
- Code: Select all
(e)=>{Scene.my.Velocity = ((e.pos - Scene.my.Position) / (sim.time - e.this.controllerAcc)); e.this.controllerAcc = sim.time; Scene.my.Position = e.pos }
In the object you want to show the velocity of the object, place the code in the script menu (in the text property):
- Code: Select all
{((Scene.my.Velocity(1) ^ 2 + Scene.my.Velocity(0) ^ 2) ^ 0.5) + " m/s"}
5 (optional). Make either the circle or the box lighter.
This should give you a reasonably accurate reading
The code gets the difference in positions and modifies it based on the amount of time passed ((collision position - last position) divided by (Current time - Time of last reading)). The text output then modifies the output of the velocity (Pythagoras' theorum; √(Velocity(y)² + velocity(x)²), converted to a string with m/s added on the end).
If you place the text on the same box as the box you are testing the velocity for, you can use the following code (in the text property in the script menu).
- Code: Select all
{"Density: " + density + " kg/m^2\n" + "Friction: " + (friction * 100) + "%\n" + ((Scene.my.Velocity(1) ^ 2 + Scene.my.Velocity(0) ^ 2) ^ 0.5) + " m/s"}
/Grady
I was about to post this message when you replied with:
spook1 wrote:thanks a lot. I'll purchase algodoo immediately
Martijn
This is a much easier option
- gradyfitz
- Posts: 174
- Joined: Tue Sep 01, 2009 8:33 am
- Location: Victoria, Australia
Re: can I save a phun scene without menus?
gradyfitz wrote:spook1 wrote:thanks a lot. I'll purchase algodoo immediately
Martijn
This is a much easier option.
And a wise decision as well since the full Algodoo is more fit for education.
Millions of voices suddenly cried out in terror, and were suddenly silenced. Something terrible has happened.
-

RicH - [Funniest Person 2010]
- Posts: 2043
- Joined: Tue Sep 01, 2009 9:01 am
15 posts • Page 1 of 1
Return to Algodoo for educators
Who is online
Users browsing this forum: No registered users and 10 guests




