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

  • Home
  • SEARCH
  • 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 8045493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:33:51+00:00 2026-06-05T05:33:51+00:00

I’ve been working on a problem for several weeks and have reached a point

  • 0

I’ve been working on a problem for several weeks and have reached a point that I’d like to make sure I’m not overcomplicating my approach. This is being done in OpenGL ES 2.0 on iOS, but the principles are universal, so I don’t mind the answers being purely mathematical in form. Here’s the rundown.

I have 2 points in 3D space along with a control point that I am using to produce a bezier curve with the following equation:

B(t) = (1 – t)2P0 + 2(1 – t)tP1 + t2P2

The start/end points are being positioned at dynamic coordinates on a fairly large sphere, so x/y/z varies greatly, making a static solution not so practical. I’m currently rendering the points using GL_LINE_STRIP. The next step is to render the curve using GL_TRIANGLE_STRIP and control the width relative to height.

According to this quick discussion, a good way to solve my problem would be to find points that are parallel to the curve along both sides taking account the direction of it. I’d like to create 3 curves in total, pass in the indices to create a bezier curve of varying width, and then draw it.

There’s also talk of interpolation and using a Loop-Blinn technique that seem to solve the specific problems of their respective questions. I believe that the solutions, however, might be too complex for what I’m going after. I’m also not interested bringing textures into the mix. I prefer that the triangles are just drawn using the colors I’ll calculate later on in my shaders.

So, before I go into more reading on Trilinear Interpolation, Catmull-Rom splines, the Loop-Blinn paper, or explore sampling further, I’d like to make sure what direction is most likely to be the best bet. I think I can say the problem in its most basic form is to take a point in 3D space and find two parallel points along side it that take into account the direction the next point will be plotted.

Thank you for your time and if I can provide anything further, let me know and I’ll do my best to add it.

  • 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-06-05T05:33:53+00:00Added an answer on June 5, 2026 at 5:33 am

    This answer does not (as far as I see) favor one of the methods you mentioned in your question, but is what I would do in this situation.

    I would calculate the normalized normal (or binormal) of the curve. Let’s say I take the normalized normal and have it as a function of t (N(t)). With this I would write a helper function to calculate the offset point P:

    P(t, o) = B(t) + o * N(t)
    

    Where o means the signed offset of the curve in normal direction.

    Given this function one would simply calculate the points to the left and right of the curve by:

    Points = [P(t, -w), P(t, w), P(t + s, -w), P(t + s, w)]
    

    Where w is the width of the curve you want to achieve.

    Then connect these points via two triangles.

    For use in a triangle strip this would mean the indices:

    0 1 2 3
    

    Edit

    To do some work with the curve one would generally calculate the Frenet frame.

    This is a set of 3 vectors (Tangent, Normal, Binormal) that gives the orientation in a curve at a given parameter value (t).

    The Frenet frame is given by:

    unit tangent = B'(t) / || B'(t) ||
    unit binormal = (B'(t) x B''(t)) / || B'(t) x B''(t) ||
    unit normal = unit binormal x unit tangent
    

    In this example x denotes the cross product of two vectors and || v || means the length (or norm) of the enclosed vector v.

    As you can see you need the first (B'(t)) and the second (B''(t)) derivative of the curve.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a jquery bug and I've been looking for hours now, I can't
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has

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.