I'm an avid gamer and i also love thinking about how i would go about recreating real world physics withing a program or should i say how would i write it out using mathematics.......

i remember my very first physics program was making a ball bounce on screen using VB6 many years ago, it was a complete failure... it bounced but i didnt have any real knowledge back then on physics and how to apply it properly in programming...

my second project was a missile launching program, i got a map of the world off of the internet and got a scale worked out that enabled me to launch missiles to and place them using real time physics which meant i had to watch my program running for hours before a saw an explosion which was a Shape.Circle or something..... it was very satisfying to see it working after all the hard work i put behind it....

im proposing on this section that instead of having people post the problems..... lets post very simple coding examples on how to apply physics to your program, this is basically a calculus topic and its not hard to learn but its sometimes hard to make it work as i have found before that i didnt know really exactly what i need to be doing to make it work.......

some possible code examples would be....

lines (finding positions between 2 points on the line)

Slopes (finding positions between 2 points on a curve)

trajectories (with gravity, air resistance, and how the shape and composition may affect the trajectory) (just like slopes but with extra parameters)

just these 3 topics is enough to build a basic 3d graphics/gaming engine which was another project i did early on in my programming life.....

and from there like anything else the possibilities are endless..... :) ]]>

I wanna make a program that calculates maximum height, horizontal range, time of flight, and the time of maximum height, and this is called projectile motion, I wanna the codes of equations to calculate these things with two given data which are primary speed and the angel. It is possible because I saw someone who made it with these things but it's arabic :( ]]>

Given:

Xcenter = Xcenter of arc

Ycenter = Ycenter of arc

Xstart = X start Point of arc

Ystart = Y start Point of arc

Xend = X end point of arc

Yend = Y end point of arc

If PointsOnArcThatMoveClkWise = true And slope < 0 Then ‘CW & slope < 0

For theta As Double = 0 To ((angleB) / 2) Step 0.1

x = (radius * Math.Cos((theta - angleB)) + Xcenter)

y = (radius * Math.Sin((theta - angleB)) + Ycenter)

xInt = Convert.ToInt32(x)

yInt = Convert.ToInt32(y)

g.drawline(redPen, xInt, yInt, Xcenter, Ycenter)

Next

End If

If PointsOnArcThatMoveClkWise = true And slope > 0 Then ‘CW & slope > 0

For theta As Double = 0 To ((angleB) / 2) Step 0.1

x = (radius * Math.Cos((theta - angleB)) + Xcenter)

y = (radius * Math.Sin((theta - angleB)) + Ycenter)

xInt = Convert.ToInt32(x)

yInt = Convert.ToInt32(y)

g.drawline(greenPen, xInt, yInt, Xcenter, Ycenter)

Next

End If

If PointsOnArcThatMoveCounterClkWise = true And slope < 0 Then ‘CCW & slope < 0

For theta As Double = 0 To ((angleB) / 2) Step 0.1

x = (radius * Math.Cos((theta - angleB)) + Xcenter)

y = (radius * Math.Sin((theta - angleB)) + Ycenter)

xInt = Convert.ToInt32(x)

yInt = Convert.ToInt32(y)

g.drawline(bluePen, xInt, yInt, Xcenter, Ycenter)

Next

End If

If PointsOnArcThatMoveCounterClkWise = true And slope > 0 Then ‘CCW & slope > 0

For theta As Double = 0 To ((angleB) / 2) Step 0.1

x = (radius * Math.Cos((theta - angleB)) + Xcenter)

y = (radius * Math.Sin((theta - angleB)) + Ycenter)

xInt = Convert.ToInt32(x)

yInt = Convert.ToInt32(y)

g.drawline(yellowPen, xInt, yInt, Xcenter, Ycenter)

Next

End If ]]>