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 6621141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:12:04+00:00 2026-05-25T21:12:04+00:00

I want to draw a cube and circles like this (sphere without fill). I’m

  • 0

I want to draw a cube and circles like this (sphere without fill). I’m using OpenTK

http://farm7.static.flickr.com/6074/6097051938_cb0b798ce0_z.jpg

I’ve been having issue as below:
I’ve try to draw a circle at the top of Cube. But when we rotate Oy the cube and the circle, the circle become Ellipse.

I’ve try to draw sphere instead circle. But can not make it like the image above.
Anybody have the solution? Thanks in advance!

And this is mine
http://farm7.static.flickr.com/6061/6096573967_22d56b2c2a_z.jpg

  • 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-25T21:12:05+00:00Added an answer on May 25, 2026 at 9:12 pm

    Draw a circle that always faces the camera, drawing a circle is easy. Just create a ring of vertices and use GL_LINE_STRIP to draw it.
    Creating a transformation matrix that always looks at the camera is a bit involved. Here is the code that does this. Simply set this one as your world matrix.

    Matrix4 createBillbordMatrix(Vector3 position, Vector3 cameraPosition, vector3 up)
    {
       Vector3 Z = Vector3.Normalize(direction - cameraPosition);
       Vector3 X = Vector3.Normalize(Vector3.Cross(up, Zaxis));
       Vector3 Y = Vector3.Cross(ZAxis, XAxis);
       Vector3 T = cameraPosition;
    
       return new Matrix4(X.X, X.Y, X.Z, 0,
                          Y.X, Y.Y, Y.Z, 0,
                          Z.X, Z.Y, Z.Z, 0, 
                          T.X, T.Y, T.Z, 1);  
    }
    

    If you know how matricies work, you should be able to figure it how it works ;). Otherwise don’t worry about it, you shouldn’t have a problem implementing it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to draw cube without indices and using VBO. I can't find anything
friends. I want draw MapOverlay like as PopUp Menu same as in this image.
I want to draw text view with 2 color like the text in this
For a demonstration, I want to draw a cube with canvas in HTML5. This
I want to draw some listview items disabled and would like to mimic the
I want to draw this in my view to draw this line, I have
I want to draw a graph in my Django-based site, to look like these
I want to draw a custom TabControl with custom functionality. To do this, i
I want to draw a stock chart using Google Chart Tools. My self-written webservice
I want to Draw a hyper Link in C# using stringbuilder when i create

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.