VBForums - Maths Forum
http://www.vbforums.com/
By popular request, a place for you to discuss Maths of all forms. Somewhere to think about algorithms and the applications of maths to programming too.enThu, 18 Jan 2018 13:06:13 GMTvBulletin60http://www.vbforums.com/images/misc/rss.pngVBForums - Maths Forum
http://www.vbforums.com/
Physics help!
http://www.vbforums.com/showthread.php?857723-Physics-help!&goto=newpost
Fri, 12 Jan 2018 20:32:45 GMTHello
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 :(
]]>Maths Forumcasper.mtahttp://www.vbforums.com/showthread.php?857723-Physics-help!Points on arc
http://www.vbforums.com/showthread.php?857481-Points-on-arc&goto=newpost
Sun, 07 Jan 2018 02:50:58 GMT 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]]>I am failing at my attempts to find points on arcs. Although I can tweek values in the code below for some cases, I believe there are tests that can be included such that “tweeking” isn’t necessary. I am asking for help to know that list of “tests” and other modifications to below that will work to find points for all arcs. Thanks in advance for your help.

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
]]>Maths ForumScottsdalehttp://www.vbforums.com/showthread.php?857481-Points-on-arc