From previous updates i mentioned that i was going to attempt to get multiple deformations taking place at once unfortunately due to problems with writing the normals in the shader caused too much trouble to fix as of the time and will hopefully be looked into fixing later if times allows it.
Instead i worked on getting objects to fall onto my surface and then transfer the energy that they have accumulated to produce the depression in the surface. The values which were used to cause this depression was the radius of the object, the mass of the object and the velocity of which the object was traveling at when it hit the surface.
Both the radius and the mass of the object are constant values and thus isn't effected by the actions in the program. The velocity however isn't a constant and changes through use of specific equations dependent on what the object is doing. In the case of the program the object is being dropped from a specific distance and is effect by the following equation:
velocity = gravity * time
This is the standard equation to find the velocity of an object as it falls from a distance and the further it falls the faster it will go. In this project the surface and object is based in a vacuum so there should be no air resistance effecting the object what so ever.
Now that the depression of the surface is effect by the surface i need to get the reformation working with it as well as at the moment when the reformation takes place the center value of the circle algorithm is lost and the whole surface returns to its original state. this needs to be fixed. After that i may attempt to get the object to be thrown into the air by the elasticity of the surface or try to get multiple depressions working. I will also need to consider spending some time adding in some more optimization in the program so that it can have larger elastic surfaces and use less memory for its usage
Monday, 18 April 2011
Friday, 15 April 2011
falling objects research
Wednesday, 13 April 2011
Monday, 11 April 2011
Kinetic energy implementation
As of now the program now has the depression of the surface effected by a mix of kinetic, potential energy, hooke's law and tension of a string. The way the equation is set up is that the basic equation of kinetic energy and potential energy are added together from the depression to find the total energy of the depression:
velocity = 1/2*mass*speed^2 + mass*gravity*height
with the total energy found the equation now needs to find the tension of the surface. To do this the surface is set up like a array of strings with its own set of strings having tension working against the energy placed on the surface. With this the equation becomes:
1/2*mass*velocity^2 = 1/2*mass*speed^2 - mass*gravity*height + ((2*tension)/(2*length))(2*sqrt(height^2 + (length/2)^2) - 2*tension)^2
This equation will find the velocity of the object been pushed upon the surface. The problem with this equation is that the program already has the velocity of the object hitting the surface. Instead what is necessary is the speed as of the time of the object which was hitting the surface. With that in mind the equation needs to be changed to get out a wanted result:
speed = velocity + sqrt(2*gravity*height) - 2*(sqrt(((2*tension)/(2*length))*(2*sqrt(height^2 + (length/2)^2) - 2*tension)^2)/mass
With this the speed of which the depression goes at can be found. After this is found the value of speed is added to the overall height to find the depth of the depression.
There was only a few problems with the implementation all really mainly based around the values of the constants used for the equation needing to be change so that the deformation had a more of a realistic look or more depth to its depression. The main problem with the height of the depression usually ended up to large for real use. this was attempt to be sorted by dividing the value found by 100 but this cause the depression to continue without stopping due to the value just continuously being added together to make the depression much larger. This was by making the value used to change the surface and the height used in the equation separate values with the the surface height just the height value divided by 100 thus not effecting the end result or the next result from the equation in ways which did not produce unwanted results.
With these values effectively placed in i plan to after this try and get multiple depressions happening at the same time as my next marker to aim for for my project and after that if there is still enough times to implement actually have objects falling onto the surface and have them effect the depression of the object
Note to self: in dissertation increase explanation of the tension of the string and the energy placed onto the surface and explain each of the values used in the equations. Include visual representation.
velocity = 1/2*mass*speed^2 + mass*gravity*height
with the total energy found the equation now needs to find the tension of the surface. To do this the surface is set up like a array of strings with its own set of strings having tension working against the energy placed on the surface. With this the equation becomes:
1/2*mass*velocity^2 = 1/2*mass*speed^2 - mass*gravity*height + ((2*tension)/(2*length))(2*sqrt(height^2 + (length/2)^2) - 2*tension)^2
This equation will find the velocity of the object been pushed upon the surface. The problem with this equation is that the program already has the velocity of the object hitting the surface. Instead what is necessary is the speed as of the time of the object which was hitting the surface. With that in mind the equation needs to be changed to get out a wanted result:
speed = velocity + sqrt(2*gravity*height) - 2*(sqrt(((2*tension)/(2*length))*(2*sqrt(height^2 + (length/2)^2) - 2*tension)^2)/mass
With this the speed of which the depression goes at can be found. After this is found the value of speed is added to the overall height to find the depth of the depression.
There was only a few problems with the implementation all really mainly based around the values of the constants used for the equation needing to be change so that the deformation had a more of a realistic look or more depth to its depression. The main problem with the height of the depression usually ended up to large for real use. this was attempt to be sorted by dividing the value found by 100 but this cause the depression to continue without stopping due to the value just continuously being added together to make the depression much larger. This was by making the value used to change the surface and the height used in the equation separate values with the the surface height just the height value divided by 100 thus not effecting the end result or the next result from the equation in ways which did not produce unwanted results.
With these values effectively placed in i plan to after this try and get multiple depressions happening at the same time as my next marker to aim for for my project and after that if there is still enough times to implement actually have objects falling onto the surface and have them effect the depression of the object
Note to self: in dissertation increase explanation of the tension of the string and the energy placed onto the surface and explain each of the values used in the equations. Include visual representation.
Subscribe to:
Posts (Atom)