Flower Drawing

Hello there.

I would like some help or guidance on create a flower with petals, buds, leaf etc. Your help would be great as I need something like a structure or function that creates a flower for me, and then preferably use that to draw at different perspectives …

My OpenGL knowledge is quite limited, but thanks for any help in advance.

Best regards,

Maria

Ohhhh… you are so romantic! :slight_smile:

… I also wanted to create an animation with roses.

There are many flower models out there free on the web. You could import the rose into a 3D modeling program and then save each bud as a different file. Then you can load all the buds separetly in OpenGL and do an animation. For example you could so an animation where all the petals fly randomly with the wind and then form the rose (like a rewinded movie).

If you want to start I would suggest you create a 3D object loading routine. I recommend using OBJ files, they are easy to parse. You can find this in many tutorials. Then either create your flower in a 3D modeling program or import one that’s already made.

I hope this helps!

Maria, please send me a message if you continue with this project. I would love to view the results. There are many few that use OpenGl for artistic purposes…

You have a great idea.

Cheers,
Rod

Thanks for the reply Rod :X I understood what you’re saying but I want to draw the object myself and not use an already made one. And I have to draw my flowers manually using vertices etc … Hope to get more help as I really want to finish this. Quite excited really.

Best Wishes,

Maria

Hi Maria! :slight_smile:
I think that should then investigate about fractals.
Fractal algorithms are used to draw trees and plants.
I think they could be used to draw flowers too, using a recursive algorithm.

Maybe you should check http://www.vterrain.org/ for that. I already read an article about that there.

Please don’t forget to send me a message once you get your flowers on screen, it would be awesome to see that!

Cheers!
Rod

If I wanted to keep is simple, I would do it the following way:

first draw a sketch of the flower you like and separate it in similar parts, like petals, shoot etc. (I don’t know how flower parts are named in english :slight_smile:
then it should be pretty easy to design a flower manually using vertices and triangles. If you want a high-quality flower you may want to use some sort of controllable surfaces, like bezier patches (this will make the design process even easier).
Finally, you can just render the shoot and the petals to combine the image. Furthermore, you could even store it in a display list. This way you can reuse the model many times with different transformations.

For OpenGL understanding, please refer to Nehe tutorials (or some others).

Of course, you could use fractals, this would be the preferable way. But I think this will make things too complicated if you just need a small project for your school/university.

Hope it helps…

this is one of the best example i have found of creating flowers from a function, it should be fairly easy to adapt the povray source code…