Question
(In C++ if possible) 8A. Create a class asteroid (or roid for short) and randomly place them in 3d space. Each has an id number,
(In C++ if possible)
8A. Create a class asteroid (or roid for short) and randomly place them in 3d space. Each has an id number, a mass, and an array of size three that contains the %mass for three important natural resources, these percentages MUST sum to less than 100, and usually are far less, the rest of the mass is considered waste. The average sum is 21% for all asteroids. You can consider each then to have a mean of 21/3 or 7% with a standard deviation of 4. No percentage can be negative. These asteroids lay in a ring of radius 50 from a center of rotation (our star). Their radius from the ring has a mean of 8 and a standard deviation of 5. They are uniformly distributed along the ring (0 to 2PI) AND from the ring. No two asteroids can exist in the same location as any other. Allow the user to enter N, the number of asteroids, generate all the values, display the data to the screen, then create a 3d gnuplot of this ring of asteroids.
(Anon who keeps spamming wrong/incomplete answers, please stop.)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started