Presentation is loading. Please wait.

Presentation is loading. Please wait.

By: Brian Cannella Andrew McCaffrey Thomas McConlogue.

Similar presentations


Presentation on theme: "By: Brian Cannella Andrew McCaffrey Thomas McConlogue."— Presentation transcript:

1 By: Brian Cannella Andrew McCaffrey Thomas McConlogue

2 Alice In Python Land

3 Table of Contents Introduction to Alice Creating Simple Worlds Scripting (Python) Demos

4 What Is Alice? Alice is a 3D Interactive Graphics Programming Environment for Windows 95/98/NT Alice was constructed by the Stage 3 Research Group at Carnegy Mellon University It was originally developed at the University of Virginia It was designed to easily make 3D Graphical worlds which can be view through a web browser. (Web browser viewing requires the Alice plugin)

5 What Is Alice? (cont.) Alice is a scripting language to control 3D objects Alice in NOT a 3D modeling program Alice cannot create new 3D object, but it can import many different types of 3D objects Alice is based on the Python programming Language, Microsoft’s Direct 3D Library, and Microsoft’s Visual Basic

6 System Requirements Windows 95/98 with DirectX or NT 4.0 with Service Pack 3 A VGA graphics card capable of high (16 bit) color

7 System Recommendations A Pentium running at 90 Mhz or better Fast VGA graphics. WRAM is better than VRAM which is better than DRAM. 16 megs of RAM A Soundblaster-compatible sound card

8 Misc Points You don’t need to consider yourself a programmer to be able to use Alice. There is a tutorial available on the Alice Website (www.alice.org) If you can’t find what you are looking for on the extensive website there is a support staff to answer your questions. Alice has an infinite undo routine built in to encourage experimentation

9 Limitations Alice only runs on Windows machines. (It is not Mac or Unix compatable.) It does not support OpenGL It currently does not support VRML, but it may in the future It does not use java except to interface with web browsers

10 Limitations (cont.) Alice does not support POV Ray Files, and has no intent to do so. However, the developers would encourage an eager person to write a module that would. Alice cannot create stand-alone applications Alice cannot create 3D objects.

11 Creating Simple Worlds In Alice How To Create A World In Alice Moving And Using Built-In Objects

12 The Alice Control Panel This is the Alice Control Panel The Different Elements Are Located On The Left The World And The Controls Are Located On The Right

13 The Camera Window This Image Is What Alice Opens Up With There Is A Blue Sky There Is A Green Earth

14 Opening A World To Load An Existing World, Just Click Open Under File

15 Inserting An Object Select An Object From The List With The Mouse Move The Object Around The World Objects Can Be Rotated By Selecting The Direction In The Control Panel

16 Alice Commands If The Mouse Is Not Precise Enough For You Use Alice Commands bunny.move(forward, 1) Will Move The Bunny Forward One Unit

17 More Alice Movement bunny.move(back, 1) Will Move The Bunny Backwards bunny.move(left, 1) Will Move The Bunny Left All Directions Are Relative

18 The Turn Command bunny.turn(left, 1/4) Will Make The Bunny Do A 1/4 Revolution To The Left

19 Interaction Between Two Objects Adding A Second Object Is As Easy As Adding The First Moving Objects Is The Same For Objects Of Different Types

20 The PointAt Command Using The bunny.pointat(helicopter) Will Cause The Screen On The Right To Occur The Rabbit Is Now Facing The Helicopter

21 Parts Of Objects The Bunny Is Actually Not One Object The Bunny Is Made Up Of Bunny.Drum, Bunny.Head and Bunny.Body These Parts Can Operate Independent Of Each Other

22 Manipulating Parts bunny.head.pointat(helicopter) Will Cause Only The Head Of The Bunny To Turn And Face The Helicopter

23 Undo Is Your Friend The Undo Command Fixes Your Boneheaded Mistakes

24 Summary Of World Creation Commands Follow A Pattern Of object.command(detail, detail) Example: –object.move(direction, distance) –object.turn(direction, revolutions) –object.pointat(another_object)

25 Summary Of Direction Objects Can Move In Six Directions –forward –back –left –right –up –down

26 Summary Of Turn Objects Can Turn Four Ways –Forward –Back –Left –Right

27 Using the Script Tab Use this to create more advanced worlds Use to run blocks of code, instead of single line code.

28 Making Barney Move A short program to show the use of the Script tab in Alice

29 Running Barney HyperlinkHyperlink to Barney

30 Code to Barney Program lookleft = DoTogether ( purpledinosaur.rightarm.turn(back,.1), purpledinosaur.leftarm.turn(forward,.05), purpledinosaur.head.turn(left,.07), purpledinosaur.rightleg.turn(back,.1), purpledinosaur.rightleg.foot.turn(right,.2), purpledinosaur.tail.turn(left,.05), purpledinosaur.head.righteye.turn(up,.15), purpledinosaur.head.lefteye.turn(up,.15) ) centerfromleft = DoTogether ( purpledinosaur.rightarm.turn(forward,.1), purpledinosaur.leftarm.turn(back,.05), purpledinosaur.head.turn(right,.07), purpledinosaur.rightleg.foot.turn(left,.2), purpledinosaur.rightleg.turn(forward,.1), purpledinosaur.tail.turn(right,.05), purpledinosaur.head.righteye.turn(down,.15), purpledinosaur.head.lefteye.turn(down,.15) ) lookright = DoTogether ( purpledinosaur.rightarm.turn(forward,.05), purpledinosaur.leftarm.turn(back,.1), purpledinosaur.head.turn(right,.07), purpledinosaur.leftleg.turn(back,.1), purpledinosaur.leftleg.foot.turn(left,.2), purpledinosaur.tail.turn(right,.1), purpledinosaur.head.righteye.turn(left,.1), purpledinosaur.head.lefteye.turn(left,.1) ) centerfromright = DoTogether ( purpledinosaur.rightarm.turn(back,.05), purpledinosaur.leftarm.turn(forward,.1), purpledinosaur.head.turn(left,.07), purpledinosaur.leftleg.foot.turn(right,.2), purpledinosaur.leftleg.turn(forward,.1), purpledinosaur.tail.turn(left,.1), purpledinosaur.head.righteye.turn(right,.1), purpledinosaur.head.lefteye.turn(right,.1) )

31 Code To Barney Program dance = DoInOrder( lookleft, centerfromleft, lookright, centerfromright ) dancemany = DoTogether ( Alice.PlaySound('i_love_you_song'), Loop(dance, 6) ) diebarney = DoTogether ( Alice.PlaySound('03_start'), purpledinosaur.destroy(duration=2.5) ) controls = acontrolpanel(caption="Things Barney Does") label = controls.makelabel(caption="Click on a button and watch Barney go.") button = controls.makebutton(caption="Watch Barney Dance", command = dancemany) button2 = controls.makebutton(caption="Die Barney Die", command = diebarney)

32 Re-Running Barney HyperlinkHyperlink to Barney

33 Demos of Alice Octopus Fred’s Head Palace


Download ppt "By: Brian Cannella Andrew McCaffrey Thomas McConlogue."

Similar presentations


Ads by Google