-
Notifications
You must be signed in to change notification settings - Fork 4
/
memosoc2018
93 lines (75 loc) · 4.47 KB
/
memosoc2018
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
I'd like to present a particle simulation system called Shadama. I
made the language for high school students to write physics
simulations, but later we are using it for different purposes.
A few words on myself. I am a computer software guy, and worked for
some companies in the past. I was making some prototypes of theme
park gadgets at Disney. I worked for SAP Labs for a while. CEO
Vision is a new start up we are trying to get started. One connection
to Potsdam is that I worked on an interactive museum exhibition for
Extavium in Potsdam 12 years ago, and yes, it apparently is still up
and running.
Now, on to the language for science.
Like I said, the primary taget of this language was high school
students who are learning sciences. I would like students to do some
real science experiments as well as computer simulation to learn
science concepts deeply. To illstrate the idea, we made a vacuum
cannon.
This is a physics phenomenon that is created by the movement of air
molecules. Basically with a simple vacuum pump and plastic pipe, you
can get a pinpon ball to get over 300km per hour.
I switch to actual demo. Here I have a text area, where you write
your Shadama program. This area shows the result, and here are some
controls to run things. Due to the time constraint, I cannot go into
the details of the actual concepts of the language, but it follows Logo
and StarLogo tradition. We refer to mobile objects as turtles.
Here, we declare a breed of turtle such that each turtle will have
properties "x", "y", "r", "g", "b" and "a".
Here I am allocating 3,000 turtles.
Those dots may be hard to see, but we can increase the number of
turtles to 30,000, 300,000 or 1 million.
What we want to do next is to move those turtles around. So we
define a method called "move".
Move increments the x and y of the turtles. We call the move method
from a static function "step". When we click the "step" clock, "step"
is repeatedly executed and the turtles move. Interestingly, while
they are moving, we can edit the program on the fly and the changes
take effect as soon as we hit Cmd-S. We could even allow each
individual turtle to have its own velocity. So let's add properties
"dx" and "dy" to each turtle. Then, we use them in "move". Here we
increment the "x" and "y" of each turtle according to their "dx" and
"dy". We use the primitive "fillRandomDir" to set the "dx" and "dy"
to be the x and y components of a randomly-chosen direction
vector. Now, all turtles move in their own individual directions.
Let's run it again by executing "setup" manually.
What happens if we change the dy at a constant rate? That is a
simulation of constant accereration, or graivty. Let us try it again.
If we add some conditions to specify what happens when a particle hits
an edge of the area it looks like this. Thsoe four if statements
dictates what happens on the edges.
I cannot go into details, but by using a notion of patch variables,
Here this fillCircle method creates a circle, and called twice from
here.
Now let's tie it all together. This code has methods we used
previously, such as "setColor". "fillCircle" is slightly modified so
that it sets normal vectors for the circle in the patch.` In the
"move" method, each turtle checks the normal in the patch cell where
the turtle is located and computes a new direction from the dot
product with the normal. When we run this, particles bounce off the
circle and make a beautiful pattern. However, it is a bit hard to see
because the colors of the turtles are too similar. Here, we change the
"setColor" method so that instead of using "x" and "y" position, we
use the velocity "dx" and "dy" to determine the turtles' color.
When I gave a talk on this system for the first time, I tried to open
my talk in a joke slide.
At the CEO Vision, we are trying to provide a way to interact with big
data in a VR/AR environment. We talked to a company executive, and he
said that he runs the company with huge spreadsheets. So we made it
possible. Here we use a public dataset, which is the mortality rate
in the US. Each row is a year, and columsn are the age. Here, for
example, for 5 years old in 1919, n % of them died in the year.
You have to imagine that you are in a VR space. You can surround
yourself by data, and you can directly interest with it.
But We want to let the user to make visualization of their own. So we
moved the Shadama language in the environment.
Our goal is to make an environment where people can make simulations
and other objects collaboratively.