Hey all,
I know this is an unusual idea - to make a coding "worklog". I'm hoping it will motivate me to actually get some work done and if you're up for it I'll bounce some ideas around in this thread. I'd still call myself a beginner programmer, though I should probably give myself a little more credit than that. I've had experience with Fortran and C++, and I tend to pick this kind of stuff up pretty quickly.
My aim is to develop a cross-platform NURBS surface editor. NURBS (Non-Uniform Rational B-Splines) surfaces are 3-dimensional surfaces defined by a number of control points.
My aim is to render the NURBS surfaces in a pretty fashion (not just mono-colour paint-style) - this is important because NURBS are smooth surfaces and some visual indication of curvature is important. I imagine this will lead me down the path of playing with shadows and lighting.
Asides from rendering, the NURBS surfaces have to be interactive - meaning that the control points can be dragged to instantly change the shape of the splines. Being 3-dimensional, I will have to go beyond the idea of just picking up the mouse clicks, since 3D translation of some sort will be required.
This is not just a learning exercise; it is code that I hope to work into something much larger - so it has to be highly robust and versatile.
As it stands, I am planning on satisfying the "cross-platform" criteria by using Qt. I have a VM which I can use to test the Linux implementation as I work. The rendering area I plan to implement with OpenGL, particularly the wrapper/libraries provided by Qt.
I've tried to make a roadmap of how I will achieve my goal.
Stage 1:
[01] Qt: Main Window ✓
[02] Qt: Dialogs ✓
[03] Qt: Console Box ✓
[04] OpenGL: Using an OpenGL widget in Qt
[05] OpenGL: Drawing basic shapes
[06] OpenGL: Detecting inputs on the OpenGL widget
[07] OpenGL: Reacting to inputs
[08] Spline: Make a 2D spline in standard c++
[09] Spline: Implement B-spline drawing in OpenGL
Stage 2:
[10] OpenGL: Updating OpenGL in a separate thread to input detection (message loop)
[11] OpenGL: Adding b-spline control points
[12] OpenGL: Detecting click+drag, updating the display
[13] ....
Stage 3:
3D Implementation
If anyone has opinions, ideas or experience with anything that may be relevant, I'd be glad to hear. Here's some topics to get the ball rolling:
I will be updating with screenshots of the progress as I venture forwards, but I don't expect this to be a quick project. Where possible I'll also share bits of my source code - particularly in regards to Qt/OpenGL (less of the maths bits).
Edited by Killhouse - 9/25/12 at 3:24pm
I know this is an unusual idea - to make a coding "worklog". I'm hoping it will motivate me to actually get some work done and if you're up for it I'll bounce some ideas around in this thread. I'd still call myself a beginner programmer, though I should probably give myself a little more credit than that. I've had experience with Fortran and C++, and I tend to pick this kind of stuff up pretty quickly.
My aim is to develop a cross-platform NURBS surface editor. NURBS (Non-Uniform Rational B-Splines) surfaces are 3-dimensional surfaces defined by a number of control points.
My aim is to render the NURBS surfaces in a pretty fashion (not just mono-colour paint-style) - this is important because NURBS are smooth surfaces and some visual indication of curvature is important. I imagine this will lead me down the path of playing with shadows and lighting.
Asides from rendering, the NURBS surfaces have to be interactive - meaning that the control points can be dragged to instantly change the shape of the splines. Being 3-dimensional, I will have to go beyond the idea of just picking up the mouse clicks, since 3D translation of some sort will be required.
This is not just a learning exercise; it is code that I hope to work into something much larger - so it has to be highly robust and versatile.
As it stands, I am planning on satisfying the "cross-platform" criteria by using Qt. I have a VM which I can use to test the Linux implementation as I work. The rendering area I plan to implement with OpenGL, particularly the wrapper/libraries provided by Qt.
I've tried to make a roadmap of how I will achieve my goal.
Stage 1:
[01] Qt: Main Window ✓
[02] Qt: Dialogs ✓
[03] Qt: Console Box ✓
[04] OpenGL: Using an OpenGL widget in Qt
[05] OpenGL: Drawing basic shapes
[06] OpenGL: Detecting inputs on the OpenGL widget
[07] OpenGL: Reacting to inputs
[08] Spline: Make a 2D spline in standard c++
[09] Spline: Implement B-spline drawing in OpenGL
Stage 2:
[10] OpenGL: Updating OpenGL in a separate thread to input detection (message loop)
[11] OpenGL: Adding b-spline control points
[12] OpenGL: Detecting click+drag, updating the display
[13] ....
Stage 3:
3D Implementation
If anyone has opinions, ideas or experience with anything that may be relevant, I'd be glad to hear. Here's some topics to get the ball rolling:
- Is OpenGL the way to do this?
- Where would I even start with the 3D translation?
I will be updating with screenshots of the progress as I venture forwards, but I don't expect this to be a quick project. Where possible I'll also share bits of my source code - particularly in regards to Qt/OpenGL (less of the maths bits).
Edited by Killhouse - 9/25/12 at 3:24pm














I like the idea of a coding work log as it is always interesting to see how others build.




