0

I'm currently working through a set of tutorials on Android OpenGL ES (1.1) and feel like I'm starting to get a grasp of how the vertices and textures work, along with some sprite animation. As I understand, the only primitives here are points, straight lines, and triangles.

I'm now trying to create a simple curve and really don't know where to start.

I want the curve to be drawn dynamically to represent something like a beam deflection like this where I could input a force and have the curve change.

Is it something I would create with a line loop or triangle fan with a ton of vertices? Or perhaps a texture that I then manipulate?

Any input or a point in the right direction is much appreciated, thanks.

unusualhabit
  • 103
  • 1
  • 4

2 Answers2

0

I can recommend this blog post http://blog.uncle.se/2012/02/opengl-es-tutorial-for-android-part-ii-building-a-polygon/ sadly the original source returns a 404. Hopefully the link provides the same quality of information. Anyhow, a good read for openGL.

sschrass
  • 7,014
  • 6
  • 43
  • 62
0

You have the general idea. Whatever you do must be made of lines, points or triangles. You can generate all the numbers for any pseudo-curve however you want, but you're always going to be passing the resulting vertices to OPENGL then connecting those with lines and triangles.