Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: How draw Callipers in OpenGL

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2014
    Posts
    17

    How draw Callipers in OpenGL

    I was tasked by my teacher of cad computer graphic to do such thing. I do not know how begin. Is it beginner or advanced task? Maybe there are similar tasks. Should it be composite works with joining of primitives that were showed in printed manuals?

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,117
    It depends on whether they are to be rendered in 3D or 2D and if you need to animate them or not. It makes a difference on how you approach the problem.

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2014
    Posts
    17
    It should be drawn in 2d mode without animation. Would you refer for similar 2d object.
    Except it I want to know where and how download library for OpenGL in Java and what is simplest way to draw objects and animation in Opengl--in c++, java or delphi-pascal (the last one is the least known by me).
    For example--http://igeo.jp/tutorial/43.html--such samples ca be executed in standart java- compiler--J-grasp for example.
    Last edited by stuttt; 05-19-2014 at 05:52 AM.

  4. #4
    Junior Member Newbie
    Join Date
    Apr 2014
    Posts
    17

    1

    I really need this the solving of this task. Would be anybody show me algorithm of doing this. What functions i need to use how to join different figures. How make the scale with text?

  5. #5
    Junior Member Newbie
    Join Date
    Apr 2014
    Posts
    17
    In general I understand that I should use Line Loop connecting the vertices. But How to draw the arc of circles or even elipses as it needed there?
    I there any method to do it simply without using trigonometry?
    I aslo want to know if i draw one figure (f.e. polygon) and then other one can the last one be visible and first one not visible? As there is moving part of calliper that should hide the part of scale.

  6. #6
    Intern Contributor
    Join Date
    May 2013
    Posts
    69
    I think sfml will do what you are looking for. Its a C++ library that manages a lot of basic stuff like window initiating/management, user input and also basic 2d drawing functions.

  7. #7
    Junior Member Newbie
    Join Date
    Apr 2014
    Posts
    17

    1

    But it is probably wholly another technology. I would like to do it in opengl. Do glew and other subparts of opengl have better abilities to draw such calliper then in glut. Or maybe pascal graph is better to do it as it was first my alternative.

  8. #8
    Junior Member Newbie
    Join Date
    Apr 2014
    Posts
    17

    1

    Here i need to draw the filled ring. So how to do it. I have such idea. I draw bigger circle with fill (how to add just there). then i draw the empty small circle inside the first one. Am i correct especially toward the using the trygonometry for circles draw.

  9. #9
    Junior Member Newbie
    Join Date
    Apr 2014
    Posts
    17

    1

    Here i need to draw the filled ring. So how to do it. I have such idea. I draw bigger circle with fill (how to add just there). then i draw the empty small circle inside the first one. Am i correct especially toward the using the trygonometry for circles draw. So can the second empty fill to cover the first one

  10. #10
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,160
    Just draw a triangle strip, alternatively defining vertices from the outer and inner ring. The nuber of steps depends on your choice and need to have fine tessellation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •