Monday, March 31, 2014

Walking Robot

This is an animation to view a walking robot. The robot can be rendered in both a wireframe view and in shaded view. There are options to manipulate the robot arms, head and torso.

Snaps:



Here is the source.
This project is quite complicated in implementation. If you observe carefully the arm and leg joints are having a sphere.

Here are a few references that you can study to research on this hot topic of
human motion simulation:

Aristidou, A. (2011). FABRIK: A fast iterative solver for the inverse kinematics problem. Graphical Models, 73(5), 243–260.

Bottema, O., & Roth, B. (1979). Theoretical kinematics. Amsterdam/Oxford: North-Holland Publishing Co.

Cardwell, O., & R. Mukundan. (2011). Visualization and analysis of inverse kinematics algorithms using performance metric maps. The 19th international conference in Central Europe on computer graphics, visualization and computer vision, WSCG-2011, Czech Republic.

Crane, C. D., & Duffy, J. (1998). Kinematic analysis of robot manipulators. Cambridge: Cambridge University Press.

Jazar, R. N. (2010). Theory of applied robotics: Kinematics, dynamics, and control (2nd ed.). New York: Springer.

Korein, J. U., & Badler, N. I. (1982). Techniques for generating the goal-directed motion of articulated structures. IEEE Computer Graphics and Applications, 2(9), 71–81.

Lander, J. (1998, November). Making kine more flexible. Game Developer, 5(3), 15–22.

Maciejewski, A. A., & Klein, C. A. (1989). The singular value decomposition: Computation and applications to robotics. International Journal of Robotics Research, 8, 63–79.

Orin, D. E., & Schrader, W. W. (1984). Efficient computation of the Jacobian for robot manipula-tors. International Journal of Robotics Research, 3, 66–75.

Parent, R. (2002). Computer animation: Algorithms and techniques. San Francisco/London: Morgan Kaufmann Publishers.

Welman, C. (1989). Inverse kinematics and geometric constraints for articulated figure manipula-tion. Master of Science thesis, Simon Fraser University.

Yamane, K. (2010). Simulating and generating motions of human figures. Berlin/Heidelberg: Springer.

The Sinking Ship

This is a project in which a ship(looks like titanic) moves from left to right and collides with an ice berg. Then in the third screen(display function) it sinks.

Snaps:



Here is the source.

Sunday, March 30, 2014

Table fan

This is a project named table fan and to me looks like a projector of the good old days(just a part of it). Pretty decent job. The blades of the fan change color on mouse input. The blades are not well rounded too. Probably this fan thing needs a mesh to cover it so that it looks like a table fan. Someone finally commented on what I have written here and I am encouraged to write more description of the projects posted here. Thanks for reading. Thanks for pointing out the misdemeanor.

Snaps:



This is the code.

Sphere Zone - A Game

This is a game and it is a task to be completed within given amount of time. There is a point which can be moved to coincide with the spheres in some select places. A key needs to be pressed which moves the sphere into the house at the top right. The more spheres moved higher the score in the given time.

The code i am posting is not tested properly.

Snaps:



Here is the source.

Specular Lighting and Texture Mapping

In this project a polyhedron formed of equilateral triangles is revolving around the x-axis. It can be texture mapped by choosing so in the pop up menu. We can also make the polyhedra vanish by toggling the alpha value while only the texture is visible(first snap). There is an option to toggle the rotation. Also to draw it without texture mapping.

Snaps:




Here is the source.

Spaceship

Very primitive project... a spaceship can be rotated and accelerated by pressing keys 'a','s','w','z'. It goes out of screen on one side and comes into view from the other.

Snaps:






Here is the code.

Simulation of Gears

Two fly wheels with teeth(my mechanical knowledge is weak) are rotating together. The transformation that is got by pressing the buttons is a little absurd. Even then this animation can be a good instructional one for demonstrating gear working.

Snaps:

Here is the source.

Selective Repeat ARQ

This is related to computer networks(a subject i don't like very much, there is lot of competition to teach that and it is important from the point of view of phd) and i have met many people who speak offensively about CG. I don't mind such minor things. Simulation of networks is an important research topic. Several network simulators like NS2(network simulator), NCTUNS exist. This project simulates and animates the Selective Repeat Automatic Repeat Request(ARQ) technique in data communications.

Snapshots:






Here is the source.

Sea View

This is a view of the sea shore with boats moving and day turning into night. To anyone having a cursory look these projects look very primitive and unprofessional. While animating 3D objects is a complicated task doing some image editing and displaying them may do the trick in getting a professional look.
Professors across universities consider copying code as cheating and sharing code also comes under plagiarism. My question to them would be how would we have progress then if you do not show your work to others and let them know how it is done. How will others learn when knowledge is kept under closed doors.
When somebody has already invented the wheel why should you patent the design and call everyone who uses it as a thief.
In this project some polygons and shading them has worked its magic and we have a beautiful sunrise scene. Hats off to the creator of this project.
Here are the snapshots during day, night(with moon, without moon):




Here is the source.

Rocket Launching

This is a project done by a student(Venkatesh) himself and i have as a teacher convinced him to part with his code. I hope we all have the open source philosophy in mind in dealing with code. So all the projects that appear here i believe are posted with the intension of being of educational value and anyone is free to download and modify the code and is encouraged to give out such code freely to the community. I have tried my best to test the code and debugged several projects with the sole intension of getting the snapshots.

The rocket launching takes place from the ground... and a suggestion for improvement that wanted to be gotten done is the camera should be linked to the rocket and the ground should go down after launch. At present the ground just vanishes and sky color changes instantly. Then stars appear and the moon(mars according to the function in the program) goes past the rocket.

Snapshot:





Here is the source. I have now succeeded in doing all the modifications i listed earlier. After launch the ground moves down, the left and right supporting structures rotate, the sky turns black from blue. Here is the source for the modified program.

Racing Car In a Racing Track

This is a circular racing track and a solitary car is logging in hours of lap time. The views can be changed by pressing buttons. There are four views. Helicopter view, side view, front view and back view. Lots of improvements can be done... there can be many cars on the track and one of them can be driven by a player while others move on their own. That would be a real car race. The track can be changed to various shapes.

Snapshot:








The first time i saw this project... it took my breath away. A student of CSE of VTU without prior programming experience may not be able to create such a project from scratch. But a sufficiently good student may be able to modify and tinker with the code here. There are a thousand ways to insert bugs in code but highly difficult to make a non working line work. Also testing code requires higher intelligence. Developers face the most challenges but the tester takes all the blame for bugs. That is why the designation of a tester is not sought after.

The sort of education that we went through in our under graduate courses... it just does not let you realize when the transformation happens. You always read a subject and pass it and realize its full import much later. You are wanting to hear something but there is no one to say you that sentence. Sometimes there are doubts but no one to clarify. The enormity of the subject sinks in very late.

Multi Mirror - An Animation

A sphere is revolving around a cone and reflections of these objects are created on the back wall.

Snapshots:







Here is the source.

Moth - An Animation

A moth is flying around a light source. The camera rolls and comes to a position ideal to view the flying moth.

Here are the snapshots:








This is the source.

Sunday, March 9, 2014

Mancala - A Game

This is a game which can be engrossing.
Lets hear the developer's Instructions=>
THE OBJECTIVE OF THE GAME IS TO COLLECT AS MANY STONES AS MANY AS POSSIBLE BEFORE YOUR OPPONENTS CLEAR'S ALL THE STONES ON HIS SIDE OF THE BOARD.EACH PLAYER SITS FACING LONG SIDE OF THE BOARD. THE FOUR CUPS ON YOUR SIDE AND STORE ON YOUR RIGHT , BELONGS TO YOU. PLACE FOUR STONES IN EACH NON -SCORING CUP.ALTERNATE TURNS.TO TAKE YOUR TURN PICKUP ALL THE STONES FROM ONE CUP OF YOUR SIDE AND PLACE ONEBYONE IN CUPS ARROUND THE BOARD,INCLUDING YOUR STORE,IN A CLOCKWISE MOVE.IF THE LAST STONE IS DROPPED INTO YOUR STORE, YOU CAN TAKE ANOTHER TURN.IF THE LAST STONE OF YOUR TURN IS DROPPED INTO AN EMPTY CUP ON YOUR SIDE,YOU MAY TAKE ALL THE STONES FROM OPPONENT'S CUP DIRECTLY OPPOSITE YOUR EMPTY CUP. ALL THE CAPTURED STONES AND THE STONE YOU USED TO MAKE CAPTURE, CAN BE PLACED IN YOUR MANCALA.
THE GAME ENDS WHEN ONE PLAYER HAS NO MORE STONES ON HIS SIDE.THE REMAINING PLAYER CAN DEPOSIT ALL THE STONES LEFT ON HIS SIDE INTO HIS STORE.THE WINNER HAS MOST STONES IN HIS STORE.

 Snapshots:









Here is the source.

Lighting Effects

This is a project which demonstrates light source moving around a few geometric objects.

Snapshot:




Here is the source.