Click here to Skip to main content
Click here to Skip to main content

Drawing Spline Types, Tension and Control Point using OpenGL and MFC

, 1 Oct 2000
Rate this:
Please Sign up or sign in to vote.
This sample teaches you how to create an OpenGL based Spline Drawing application
<!-- Download Links -->
  • Download source files - 43 Kb
  • <!-- Article image -->

    Sample Image - MFCSpline.gif

    Introduction

    This sample teaches you how to create an OpenGL based Spline Drawing application using the MFC library.

    It shows how to setup 4 Control Points:

    1. Start Point
    2. End Point
    3. Tangent Start Point
    4. Tangent End Point

    User Interactions

    • Right click to load the on screen context menu.
    • Left click and drag to move the selected control point around and see its effect on the spline.
    • From the Spline menu, you can select the Type of Spline: Hermite, Cardinal or Bezier.
    • In the same menu you can change the Tension of the control points effect on the spline.
    • You can also select different control points between: Start/End points and Start/End Tangent points.

    Rquirements

    The application requires opengl32.dll for windows which can be obtained from www.opengl.org.

    Notes & Credits:

    The original source code for the Spline Drawing Application is GLUT based and I found it posted on www.planet-source-code.com, OpenGL codes link. Please check the sample.

    License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here

    Share

    About the Author

    Masoud Samimi
    Technical Lead Samimi Information Technology
    United Arab Emirates United Arab Emirates
    My company provides services in the fields of:
     
    LAN/WAN Networking
    Data Management and Security
    Data Recovery
    ERP/CRM Solutions
    IT Infrastructure Solutions
    Software/Hardware Sales/Service

    Comments and Discussions

     
    GeneralThis is copied from... PinmemberJohnSmithTheSecond14-May-09 11:02 
    QuestionHow to run 2 different(or same) OpenGL objects in one DialogBox? Pinmemberwerter13-May-04 22:21 
    QuestionSplines? PinmemberHockey30-Oct-03 21:41 
    Generalanomaly in click-n-drag PinsussAnonymous4-Apr-03 14:54 
    I tried running the executable you have provided in the zip file. Clicking on a point and dragging it gives a really weird spline. Hopefully should be a minor fix
    GeneralRe: anomaly in click-n-drag PinmemberSickboy18-Oct-03 8:33 
    QuestionWTF? PinsussAnonymous1-Apr-03 14:01 
    AnswerRe: WTF? PinsussAnonymous1-Nov-03 2:09 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    | Advertise | Privacy | Terms of Use | Mobile
    Web02 | 2.8.141216.1 | Last Updated 2 Oct 2000
    Article Copyright 2000 by Masoud Samimi
    Everything else Copyright © CodeProject, 1999-2014
    Layout: fixed | fluid