Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mike R-D YRDSB.  Demo  Requires a simple plug-in downloaded from website  Plug-in adds new option when you create a project.

Similar presentations


Presentation on theme: "Mike R-D YRDSB.  Demo  Requires a simple plug-in downloaded from website  Plug-in adds new option when you create a project."— Presentation transcript:

1 Mike R-D YRDSB

2  Demo

3  Requires a simple plug-in downloaded from website  Plug-in adds new option when you create a project

4  Imports all necessary packages/libraries  Students only need to worry about ‘Source Packages’  All of the Alice classes are shown as Java classes.  This means…

5  you can do with Alice!!!!  Teach advanced Java concepts with ease (Sorting, Recursion, 2D Arrays, Dynamic Programming)  Implement a Text-Speech Alice Storyteller with JSAPI  Alice 3.0 mail interface for children using javax.mail

6 hmmm a main method initialize the program Run the program showInJFrame() displays the scene on a graphic canvas

7

8  The Alice World is 3D, with the center being the center of the World (0,0,0) Without the ALICE IDE, we need to be more professional with our placement of objects A Position Class has been defined which provides an X,Y,Z coordinate X-> subtracting moves right Y -> subtracting moves down Z -> subtracting moves towards camera

9  normally you will move and rotate objects using the Alice methods  I’m going to cheat a little  A Quaternion represents rotations in 3D space  (a,b,c,d)  a: forward/backward rotation  b: right/left turn  c:right/left rotation  d: haven’t taken math in 15 years

10

11

12

13 So far… we have the penguins each pushing a snowball a random distance… is the snowball in the water? Do in order penguin1.push snowball1 a random distance penguin2.push snowball2 a random distance if snowball1 and snowball 2 are both in the water penguin1.swagger penguin2.swagger else if snowball1 is in the water penguin1.swagger else if snowball2 is in the water penguin2.swagger else neither is in the water try again…

14 if (condition is true) { execute statement block1 } else { execute statement block2 } condition statement block1 statement block1 TrueFalse statement block2 statement block2

15  hasReceived is a method (function) that returns true if a snowball's location is within the radius of the holeInIce (a blue circle object in the scene), otherwise it returns false.

16  If hasReceived is true, the snowball is in the water and it should disappear (set opacity to zero)

17 Multiple conditions Do in order penguin1.push snowball1 a random distance penguin2.push snowball2 a random distance if snowball1 and snowball 2 are both in the water penguin1.swagger penguin2.swagger else if snowball1 is in the water penguin1.swagger else if snowball2 is in the water penguin2.swagger else neither is in the water try again…

18

19 Cascading if…else's Do in order penguin1.push snowball1 a random distance penguin2.push snowball2 a random distance if snowball1 and snowball 2 are both in the water penguin1.swagger penguin2.swagger else if snowball1 is in the water penguin1.swagger else if snowball2 is in the water penguin2.swagger else neither is in the water try again…

20

21

22  You should have guessed by now that with our transition to Java comes the ability to have 2D and 3D arrays [something that any 3D world should have  Think of how painstaking it was to create an array of Sims in Alice 3.0. Now, let me demo.

23 public void sort(int[] x){ for (int counter = 0; counter < 10; counter++) { //Loop once for each element in the array. for (int index = 0; index < 10 - 1 - counter; index++) { //Once for each element, minus the counter. if (x[index] < x[index + 1]) { //Test if need a swap or not. int temp = x[index]; //These three lines just swap the two elements: x[index] = x[index+1]; x[index + 1] = temp; } Sorting elements in Alice is just a matter of replacing x with an object array and adding code to animate the move

24  Tired of textual Towers of Hanoi?  Bored with Fib Fib-Fib Fib-Fib-Fibonacci?  Bring Alice into the equation and in a few minutes have a Recursive Party

25  multipleScenesAlice NetBeans Project  One of the number 1 requests Alice 2 couldn’t handle. Storybook Alice tried, but was weak.  Still a little glitchy, but piece of cake in Alice 3.0  Also makes group collaboration a cinch

26  In my opinion, parallel programming grossly neglected by Ministry and us  Alice is natively threaded (Do Together) and it makes it natural to use this as a teaching tool  Can illustrate collisions, semaphores, etc  mitjokes - NetBeans Project


Download ppt "Mike R-D YRDSB.  Demo  Requires a simple plug-in downloaded from website  Plug-in adds new option when you create a project."

Similar presentations


Ads by Google