Here is a 5 pointed star, drawn 4 times centered inside a open faced sphere
The code is as follows
pi = 3.1415
push
push
moveto 0,0,0
pitch 90
repeat 9
move 2
repeat 9
pitch pi*pi
move 2
end
yaw 90
pitch pi*2
move pi//2.3
yaw 90
repeat 10
move 2
pitch pi*pi
end
pitch -10
yaw -pi*47
end
pop
moveto 0,0,0
moveto 0,10,0
scaleFactor = 4
repeat 2
pitch 54
move 5
pitch 36*6
move 4.045*2
pitch 36*4
move 5+4.045
pitch 36*-4
length = 10.59
move length
pitch 36*4
move length
pitch 36*6
move 4.045
pitch 54
roll 90
end
pop
moveto 0,25,0
pitch 180
roll 24
pitch 90
repeat 9
move 2
repeat 9
pitch pi*pi
move 2
end yaw 90
pitch pi*2
move pi//2.3
yaw 90
repeat 10
move 2
pitch pi*pi
end
pitch -10
yaw -pi*47
end
nsides = 10
tube
The process for this homework was fairly straightforward and mostly was combining knowledge from various labs into a single cohesive unit.
One hurdle that I worked through (and I am not sure if I forgot something from class) was that all of my skyboxes were displaying their images upside. This created a somewhat odd user experience so I flipped the images 180 degrees to aid in proper orientation. I brought all of the objects into blender (except the ground) and mapped UV coordinates with my textures before bringing them into the program.
After this hurdle was overcome, adding the magnet logic was fairly straightforward – I ended up writing additional Vector4 operators (just plus and minus) to help aid in computation.
]]>I then moved onto analyzing the formula to be used as the center point of calculations. I made a list of structs for holding basic information related to the random generated bumps. A few loops was all it took to calculate the proper intensities from the various bumps, which were then mapped to a color gradient based on the intensity and the x,y position of a pixel. The output is shown below with a couple different parameters.
A problem that was encountered during development was I receiving 1.#IND errors from some calculations which would created nice solid black lines across the image. This error can be caused for a couple of a reasons but the main one is divide by zero. I was generating variances with a value of zero which of course is not a good thing for the formula. The error was fixed by simply adding one to every random variance.
]]>Achievements
Challenges
Many problems arose during the development of the application: fighting with the android sdk, getting google play services jar imported correctly, messing up my version control, and working with InteliJ instead of Android Studio. It is kind of hard to look backwards in retrospect to identify the exact problems because most if not all of them were eventually solved. Oh well, it was definitely a very long yet very helpful journey.
Screenshots
]]>
To meet additional goals for the project I will also implement the hiscore database in a remote database, saving user settings preferences, displaying user settings in a custom list view, localizing strings, embedding google analytics, displaying an openGL animation on the main activity. If all goes well I will also try some additional items: sending user preferences to a web server with JSON using REST, adding voice commands, and finally releasing the app on the Google Play Store.
]]>“A man searches the wild north for treasure, but discovers something unexpected.”
-Ryan, Dave, Cody, Adam, Michael
]]>