Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Spintwo

Drawing Accurate Graphs

This topic is 5366 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there a certain way you can draw graphs (exponential forumulas especially, EX: y=x^2 etc.) to make them accurate? In automatic graphers etc., it draws you the curves but how do you draw accurate curves by hand (other than plotting every point in between). If you don''t do this and resort to making straight lines between two points, then it looks a bit funky.
Charles Hwang -aka Tazel [MonkeyHumor My Site|E-mail|NeXe|NeHe|SDL] [Google|Dev-C++|GDArticles|C++.com|MSDN]

Share this post


Link to post
Share on other sites
Advertisement
plot infinitely many points on the graph and then join those points and you will get a smooth curve

Share this post


Link to post
Share on other sites
Well the maximum accuracy you''ll see will depend on the resolution, so just calculate a point for every pixel on the axies. Then if you zoom in or out you only need to recalculate the area within the view at a higher number of subdivisions.

Or if thats too slow then use line segments, but again link the number of subdivisions to the actual visible size on screen.

Share this post


Link to post
Share on other sites
You could use a french curve or a spline. A spline is a flexible strip you bend to the shape you want. With a homework assignment for a math class just use multiple strokes. Plot enough data points so you have a feel for what the curve looks like then sketch it in. You don''t need to be accurate, just representative.

Share this post


Link to post
Share on other sites
If you want to be really hardcore, here''s the way to do it right:
http://www.dgp.toronto.edu/people/mooncake/papers.html

"Math is hard" -Barbie

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!