Alice Community  

Go Back   Alice Community > General Discussion > Questions and Comments

Reply
 
Thread Tools Display Modes
Assignment 2
Old
bfry
Member
 
Status: Offline
Posts: 22
Join Date: Jan 2012
Default Assignment 2 - 01-29-2012, 07:53 PM

Hello,

I completed my second assignment. For simplicity, I chose to create a world with a combination lock that automatically goes through the combination and then unlocks. The sound at the end is a doorbell because I could not find a sound of a lock click.

The project worked as expected but I really had to play with the number of revolutions to get the dial to stop on the desired numbers -- which was time-consuming. Is there is an easier way to do that or is it all just trial and error?

I have attached the file if you want to check it out.
Attached Files
File Type: a2w Assign2PP1.2.a2w (390.1 KB, 29 views)
   
Reply With Quote
Old
fourbros
Senior Member
 
fourbros's Avatar
 
Status: Offline
Posts: 476
Join Date: Nov 2011
Location: Right Behind You...
Wink 01-30-2012, 01:02 PM

pretty nice to answer your question there is an easier way to do that, you need to tun the dial manually and "Capture Pose" then make the dial "Set Pose To" etc. etc. etc. This can also be used for many other things to.


My avatar is from the anime "Hyouka".......

You've probably never seen it, much less heard of it.....

You should watch it........


print("Hello World")
This is python code.

Lakers > Clippers
Vikings > Packers
Cardinals > Brewers/Pirates/Cubs/Reds
   
Reply With Quote
Old
bfry
Member
 
Status: Offline
Posts: 22
Join Date: Jan 2012
Default 01-30-2012, 11:49 PM

Quote:
Originally Posted by fourbros View Post
pretty nice to answer your question there is an easier way to do that, you need to tun the dial manually and "Capture Pose" then make the dial "Set Pose To" etc. etc. etc. This can also be used for many other things to.
I knew there had to be an easier way.

I've heard about "Capture Pose" and "Set Pose to" but I think those things will be introduced in the more advanced chapters of the book. I don't want to get too ahead of myself I appreciate the advice and will probably use it in the future.

At first glance I thought Alice was a very simplistic graphical programming tool, but as I'm advancing I can clearly see that Alice is actually quite sophisticated with the ability to do a whole lot more.
   
Reply With Quote
Old
Mr Kidnapper
Senior Member
 
Status: Offline
Posts: 442
Join Date: Feb 2011
Default 01-31-2012, 01:06 AM

Poses are where you rotate parts of an object into a position and save the position so the object can move to it later. It won't be much help for your combination lock thing. In the case of dials, if it was accurately made, you could use math to find the rotation necessary. I don't know what level math you take, so I'm just going to do all of it.

In my school you turn the dial right, left a complete turn, then right again, so if you had combination "8, 4, 9", you would turn the dial 1π radians to the right, 2π+π/2 to the left, and π/2+π/8 to the right. That's 180º right, 450º left, and 112.5º right. Then you divide each of these degrees by 360 to find their Alice equivalents (Because Alice measures in percent decimals.) to get the amount to turn.
By the way, I'm getting the numbers by counting the lines clockwise starting from 0.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 01-31-2012, 02:17 AM

Yeah, we used math too. I think I might have assigned the amount of rotation it took to move one degree to a variable and multiplied that as well.

Both work quite nicely.


(')>
   
Reply With Quote
Old
bfry
Member
 
Status: Offline
Posts: 22
Join Date: Jan 2012
Default 02-01-2012, 05:33 AM

Quote:
Originally Posted by Mr Kidnapper View Post
Poses are where you rotate parts of an object into a position and save the position so the object can move to it later. It won't be much help for your combination lock thing. In the case of dials, if it was accurately made, you could use math to find the rotation necessary. I don't know what level math you take, so I'm just going to do all of it.

In my school you turn the dial right, left a complete turn, then right again, so if you had combination "8, 4, 9", you would turn the dial 1π radians to the right, 2π+π/2 to the left, and π/2+π/8 to the right. That's 180º right, 450º left, and 112.5º right. Then you divide each of these degrees by 360 to find their Alice equivalents (Because Alice measures in percent decimals.) to get the amount to turn.
By the way, I'm getting the numbers by counting the lines clockwise starting from 0.
I figured there had to be a mathematical solution as well, but as you've just demonstrated, it's beyond my mathematical comprehension. You lost me at radians
I do appreciate you breaking it down to a more simplistic level for me though.
   
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.