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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:15:06+00:00 2026-05-12T00:15:06+00:00

I am trying a couple of tutorials from http://nehe.gamedev.net , in order to learn

  • 0

I am trying a couple of tutorials from http://nehe.gamedev.net, in order to learn openGL programming, I would like to position spheres along a Bezier curve such that they appear as a string of pearls. how can I position such spheres along the curve. I am drawing the curve using de Casteljau’s algorithm and hence can get the XYZ points on the curve.

  • 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-12T00:15:06+00:00Added an answer on May 12, 2026 at 12:15 am

    If your spheres are small enough relative to the overall length of the Bezier curve, you can just position your spheres at even intervals to get an appearance similar to a string of pearls. (If the spheres are relatively large then you’ll have to start worrying about sphere overlap more — not an easy problem, and probably not very instructive for learning OpenGL.)

    The parameter value t of a Bezier curve varies from 0 to 1. To evaluate your Bezier curve at 10 locations (the ends and eight interior points) you can do something like this:

    for( int i = 0; i <= 9; ++i )
    {
        double t = i / 9.0;
        double x, y;
        EvalBezier( t, x, y );
        DrawSphere( x, y, radius );
    } 
    

    Where EvalBezier( t, x, y ) fills in (x,y) for a given t. Just pick radius to give you a pleasing result. If you want to try to pick radius automatically, just use half the minimum distance from the point i to points i-1 and i+1 as a rough estimate. If you do this, remember to handle the end points specially, using either only the next or previous points (whichever you have).

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

Sidebar

Related Questions

I'm trying to follow a couple of tutorials on using the standard ASP.NET membership
I've been trying for a couple of days now to learn UDK, but I
I'm trying to learn OpenGL ES quickly (I know, I know, but these are
I’m new to asp.net and the mvc framework and I’m trying to learn by
Following a couple different tutorials, I've been trying to build a Silverlight Business Application
I have a couple of questions. I'm trying to learn how to make web
Going through the tutorial here: http://www.asp.net/mvc/tutorials/iteration-4-make-the-application-loosely-coupled-cs I've noticed that they are passing the EF
So... I'm working on trying to move from basic Python to some GUI programming,
i'm fairly new to django and just trying a couple simple experiments to get
So I have been working and trying for a couple of hours. I am

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.