In VB6 my goal was to solve equations like this one:
x=1
y=2
z=(x^2+y^2+3+7/2*2)^0.5/(x+y)
find z.
A tree was built on the order of operations like here:
Code:
***************************************
Content of this section is hidden, You must be registered and activate your account to see this content. See this link to read how you can remove this limitation:
http://forum.civilea.com/thread-27464.html
***************************************
The goal was to allow basic scripting e.g. analysis model template, optimization by brute-force :), adaptive modeling. Given a template the user could set some dependencies and constants and equations so the model was defined by an equation system.
e.g.
x=-50..50
y=-50..50
z=x^2+y^2+5
Like Tekla Structures scripting and parameter modeling in Custom Component editor or like Ansys Workbench.
Now there's a lot of software that allows parametric modeling. The target now is to reliably link all the packages.
So it depends on your requirements, just look at equations or solve them or...
For SharpGL, go to:
Code:
***************************************
Content of this section is hidden, You must be registered and activate your account to see this content. See this link to read how you can remove this limitation:
http://forum.civilea.com/thread-27464.html
***************************************
Download the source, has some samples, most are classic opengl (or immediate mode), but it has an interesting SceneGraph.
To keep an order of all stuff, a scene is useful, it is a structure of objects, a tree, the root is the black window, objects can be added, modified, enabled/disabled, attach effects to them...
It depends what you require, e.g. if you render more than 100000 lines or points or triangles /frame, 30 fps, modern OpenGL is required. VBO, VBA and shaders.
Most links I had for tutorials are dead now, something like this:
Code:
***************************************
Content of this section is hidden, You must be registered and activate your account to see this content. See this link to read how you can remove this limitation:
http://forum.civilea.com/thread-27464.html
***************************************
It works like this:
Create static buffers to store the data: vertex positions, colors, normals
Push the data in those buffers.
Draw and redraw lines/points/triangles using the buffers.
Deform, translate, rotate the objects using shader code.
If the objects are not static, and the shape equation can't be written in shader, push the data to the buffers each time required.
Buffers means that the data is transfered once from CPU RAM to GPU VRAM (requires bandwidth and cpu time).
How many buffers: one for the whole scene or multiple for different objects, some adaptive algorithm is required based on GPU specifications, max buffers count, max buffer length.
And I know you like it from c++, in modern opengl manual memory management is required for the GPU VRAM using these buffers (destroy, create...)
So what scene do you have in mind? You could prototype it using some higher level library.
Code:
***************************************
Content of this section is hidden, You must be registered and activate your account to see this content. See this link to read how you can remove this limitation:
http://forum.civilea.com/thread-27464.html
***************************************