This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-07-14 00:04:04

GreenCloud
New Scratcher
Registered: 2012-07-12
Posts: 46

Laser physics

I need some for my newest game, Laserfield.

Offline

 

#2 2012-07-14 01:30:30

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: Laser physics

Be more specific please, so we can tell you exactly what you need.  smile


Why are the secret organizations getting all the attention?  mad

Offline

 

#3 2012-07-14 08:05:41

Maki-Tak
Scratcher
Registered: 2008-03-10
Posts: 100+

Re: Laser physics

Are we talking light physics, like what happens when you shine a beam of light on a mirror?
You'd need to find the mathematical formula for that, I think, and then recreate that formula in a script.


http://i.cubeupload.com/zZE0XJ.png

Offline

 

#4 2012-07-14 08:31:11

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Laser physics

when clicked
go to
startpoint
point in direction
start direction
forever
clear
pen down
repeat until
touching
reflective colour
?
or
touching
reflective colour
?
move
10
steps
if
touching
reflective colour
?
point in direction
direction
*
-1
if
touching
wall colour
?
stop script

that's a simple, one way beam script


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#5 2012-07-14 10:15:40

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: Laser physics

^^^
If touching reflective color or wall color.


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

#6 2012-07-14 12:17:30

Nathanator1416J
Scratcher
Registered: 2012-02-21
Posts: 100+

Re: Laser physics

do you want info like reactions to hitting lenses?
here are some:

+++-------()<()====)(>()---
() is Convex lens
)( is concave lens
+++ is laser emitter
------ is thin light beam
==== is thick light beam
< is beam getting wider
> is beam getting thinner

Last edited by Nathanator1416J (2012-07-14 12:19:42)


http://wiki.scratch.mit.edu/images/Ptp.gif PEPPERTREE  Productions (PtP)
Tourmaline Scientific Research Programs

Offline

 

#7 2012-07-14 12:29:41

GreenCloud
New Scratcher
Registered: 2012-07-12
Posts: 46

Re: Laser physics

zammer990 wrote:

when clicked
go to
startpoint
point in direction
start direction
forever
clear
pen down
repeat until
touching
reflective colour
?
or
touching
reflective colour
?
move
10
steps
if
touching
reflective colour
?
point in direction
direction
*
-1
if
touching
wall colour
?
stop script

that's a simple, one way beam script

Not like this..

I want the laser to be like my project, pen experiment.
There are 2 handles to the laser beam, one on one side, and the other on the other side of the laser beam...
And there should be room for 4 handles...

Offline

 

#8 2012-07-14 14:37:50

GreenCloud
New Scratcher
Registered: 2012-07-12
Posts: 46

Re: Laser physics

Help!

Bump!

Offline

 

#9 2012-07-17 07:41:41

Ludburghmdm
Scratcher
Registered: 2010-04-02
Posts: 100+

Re: Laser physics

Sorry, i want to help, but i have NO IDEA what your talking about  hmm


https://dl.dropbox.com/u/59329517/SmallerLogo.png
Please re-post this if you are against bullying.

Offline

 

#10 2012-07-17 08:22:27

Prestige
Scratcher
Registered: 2008-12-15
Posts: 100+

Re: Laser physics

if
touching
Reflective Mirror
?
change x by
sin
of
direction
*
0
-
move speed
if
touching
Reflective Mirror
?
point in direction
180
-
direction
else
point in direction
0
-
direction
change x by
sin
of
direction
*
move speed

The
change x by
sin
of
direction
*
move speed

should be outside of the else condition, I just don't know how to do it with scratchblocks - it shouldn't be inside the if else.  smile


"Don't insult someone until you've walked a mile in their shoes. That way, if they don't like what you have to say, you'll be a mile away and still have their shoes  smile  "

Offline

 

#11 2012-07-17 08:43:39

berberberber
Scratcher
Registered: 2012-03-08
Posts: 1000+

Re: Laser physics

Prestige wrote:

if
touching
Reflective Mirror
?
change x by
sin
of
direction
*
0
-
move speed
if
touching
Reflective Mirror
?
point in direction
180
-
direction
else
point in direction
0
-
direction
change x by
sin
of
direction
*
move speed

The
change x by
sin
of
direction
*
move speed

should be outside of the else condition, I just don't know how to do it with scratchblocks - it shouldn't be inside the if else.  smile

Did it for you.


http://i47.tinypic.com/2iaa73k.png

Offline

 

Board footer