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.
Monday, 11 April 2011
Monday, 4 April 2011
Monday, 28 March 2011
changes made to the deformation and reformation
for the past week i have been working on getting my deformation and reformation to real more realistically at the start of the week i was able to get the reformation working the way it should without took much hassle. only a few values used in the program needed to be changed to get the reformation working more realitsically
the defomration though caused alot of troubles. i originally intended to use the equations of an ellipsoid but this caused a problem with the deformation with the values throughout the whole surface being effected making the surface slanted and when made to deform cause the surface to stretch but not deform the way its suppose to do. With some thought the method has been changed to use the circle algorithm used to produce terrain. This works exceedingly well although it needs some teaks to get it working properly.
The ray intersecting has yet to be properly implemented and this needs to be seriously considered in the comming days and gotten to work as it is inputted.
the defomration though caused alot of troubles. i originally intended to use the equations of an ellipsoid but this caused a problem with the deformation with the values throughout the whole surface being effected making the surface slanted and when made to deform cause the surface to stretch but not deform the way its suppose to do. With some thought the method has been changed to use the circle algorithm used to produce terrain. This works exceedingly well although it needs some teaks to get it working properly.
The ray intersecting has yet to be properly implemented and this needs to be seriously considered in the comming days and gotten to work as it is inputted.
Tuesday, 22 March 2011
update
right first update in a month. from the previous update the deformation has been placed in but hasn't been changed and reformation has been also placed in. this at first only worked as an inverse of the deformation but has later been changed to work with the bottom part of the reformation returning first and it slowly receding back to the start of the surface. ray/triangle intersection has also been implemented in but hasn't been properly introduced to work and run with the program.
I at the moment am working on getting the insecting traingles work to run and do what it suppose to on the program by allowing the user to select where the deformation taken place using a mouse. I am also looking into changing the deformation to a more realistic shape. this most likely would be a ellipsoid shape. After this i plan to work on the limitations of the deformation by making it dependent on the amount of kinetic eneergy placed on the surface and the tension of the surface working against the deformation of itself.
I at the moment am working on getting the insecting traingles work to run and do what it suppose to on the program by allowing the user to select where the deformation taken place using a mouse. I am also looking into changing the deformation to a more realistic shape. this most likely would be a ellipsoid shape. After this i plan to work on the limitations of the deformation by making it dependent on the amount of kinetic eneergy placed on the surface and the tension of the surface working against the deformation of itself.
Monday, 28 February 2011
Deformation
A late submission for an update but as of this time i now have the surface deform correctly. This means it slowly goes deeper the longer the depression has accumalted. It has of this time forms more of an traingluar like deformation and so at later dates i will have to look at the equation and change it so that it can produce a more realistic outcome. The next thing that is planned to be added in is ray tracing so the user can choose the location of the deformation with much realitve ease. I hope to get this done quickly and move straight onto the reformation of the object itself.
I also need to consider my next objective after getting in reformation should i continue adding in new and better equations for the surfaces deformation or should i move on to tryin to get the object optimised to a reasonable standard so that it can loaded in with easy use into other programs.
I also need to consider my next objective after getting in reformation should i continue adding in new and better equations for the surfaces deformation or should i move on to tryin to get the object optimised to a reasonable standard so that it can loaded in with easy use into other programs.
Thursday, 10 February 2011
Working shader
The shader which is to be used for deformation is implemented and running. It does what it is intended to do but does not give out the wanted results of a surface deformer instead moving the entire surface with each iteration. This is most likely down to the way of which the planes are drawn with mine being built differently from the example which i found. I could try to fix this but i have decided to skip it and just continue on into making a mesh deformer using the shader given. I will do this by first chosing a position of which pressure would be applied onto the surface then with each increase in pressure on this position will create a further depression of the surface. a limit will be necessary so that the end result return realistic enough. this will need to be smoothing so it less jaged
Subscribe to:
Posts (Atom)