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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:04:30+00:00 2026-05-31T17:04:30+00:00

How can I calculate points around a sphere? I need this for my particles

  • 0

How can I calculate points around a sphere? I need this for my particles explosion. I don’t want the particle’s points to be all random. I need them in a spherical pattern.
For 2d circle explosion I was using this:

float n=many;
float rad = 1;
for (int i = 0; i < n; i++)
{
        float fi = 2*PI*i/n;
        float x1 = rad*sin(fi + PI)+x ;
        float y1 = rad*cos(fi + PI)+y ;
        addparticlesmart(x,y,(x1-x),(y1-y), 0.01f),r,g,b,a,0.02f);
}
  • 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-31T17:04:31+00:00Added an answer on May 31, 2026 at 5:04 pm

    You have a few options.

    Lat / Lon – Loop over latitude from -π/2 to + π/2 and longitude from 0 to 2π at whatever interval you like. Then convert from spherical to cartesian coordinates. While this is easy to code, it has the disadvantage that the points tend to cluster at the poles.

    Tessellation – You can pick a regular polyhedron, preferably with triangular faces, (an icosahedron is my favorite for this purpose) and recursively find the bisector of each edge of each face. You then divide that face into four triangular faces, normalizing the bisector points so they lie on the surface of the sphere. Though the points are not quite uniformly distributed over the sphere (which can be seen if you don’t use an icosahedron as the base polyhedron) it appears to be much more evenly distributed than the lat / lon approach. It has as a disadvantage, being somewhat more difficult to code. A more detailed description is available here.

    Random points – I know you said you didn’t like the idea of picking random points, but I’ll include it here for completeness. There is a good treatment of it at Wolfram’s site.

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

Sidebar

Related Questions

I have a list of Vector3 points in c#, and I need to calculate
I got a grid with two points. I want to calculate the amount squares
How can I calculate a point (X,Y) a specified distance away, on a rotated
How can the following function be implemented in various languages? Calculate the (x,y) point
Hi i was wondering if anyone knows how i can calculate the difference between
How can I calculate the value of PI using C#? I was thinking it
How can I calculate the number of work days between two dates in SQL
How can I calculate the last business day of the month in .NET?
How can I calculate the width and height of a <div> element, so as
How can I calculate the number of differences between two NSStrings. Example: NSString 1

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.