Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6799547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:51:41+00:00 2026-05-26T18:51:41+00:00

I am trying to draw a cylinder in OpenGl. I found this algorithm but

  • 0

I am trying to draw a cylinder in OpenGl. I found this algorithm but I can’t make any sense of it.

http://paulbourke.net/miscellaneous/sphere_cylinder/

“Given the two perpendicular vectors A and B one can create vertices around each rim of the cylinder. So, for a 4 vertex facet the vertices might be given by the following where theta2 – theta1 is some suitably small angle that determines the roughness of the approximation.”

How can I find A and B ?? I am using glm. can glm calculate cross product?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:51:42+00:00Added an answer on May 26, 2026 at 6:51 pm

    A and B form the base of a orthogonal (prefarably orthonormal), cartesian 2D coordinate system. Think of them like X and Y axes. Recall that the parametric equation for a circle is

    p(t) = r (X cos(t) + Y sin(t))
    

    Now replace X and Y with A, B, and you got the equation for the circular cross section of a cylinder. To make it a cylinder you extrude by the vector perpendicular to A and B, i.e. C = A × B

    p(s, t) = s * C + r (A cos(t) + B sin(t))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to draw a cylinder, but its not working :( Can you
I am trying to draw a series of rectangles using OpenGL but some of
I am trying to draw a transparent plane (X[0..100],Y[0..100],Z=0) in Java 3D, but can't
Im trying to draw a globe in Android, I use OpenGL for this. However
I'm trying to draw a vertical scrollbar for my G15 applet, but am having
I am trying to draw a transparent (alpha) PNG image using CxImage, but it
I am trying to approximate a sphere using the instructions at http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/sphere_cylinder/ , but
I'm trying to draw a few images on a canvas, to make sure the
I am trying to draw a figure something like this: I need to have
When trying to draw on an OpenGL widget with QT, the window display ends

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.