  Members

722

## Community Reputation

0 Neutral

• Rank
Prolific Member
• Birthday 01/14/1983

## Contact Methods

• Website URL
http://www.systemlords.com

## Profile Information

• Gender
Male
• Location
Missouri
1. Actually the zero probably affects if the vakue is negative or not
2. Actually this is for unity game engine. Atm center is 0,0 So I'm dealing with negative numbers
3. Ahh OK. Thanks now I know how to find theta. I can just ignore cy and CX right since that's always going to be 0,0?
4. Thanks for thee responses guys. Ya I meant spaced around its circumference. So together all 20 objects forms a circle. I think this is the formula I saw when I was trying to google it Barand. I'm confused about the theta part Do I use pie for that? Also not sure how this would give me 20 spaced out. But I guess the theta would determine that. so really I need 20 slices of pie and a object in the middle of each slice on the circumference. Maybe I need to find the circumference first then divide it out by 20. Then find what each one would be spaced out on the circumference. Then some how use that number with a formula to find my x and y?
5. Every year I run into some math that is over my head lol. Say I have a circle with a radius of 600 and I want to place 20 objects around the circle perfectly spaced. I need to figure out what the x and y would be for each object.
6. That's an amazing idea Barand on generating the array. Didn't consider taking a new percentage of the stars left on each level when building the array. cheers
7. A new idea has arose. \$planets = 10,000; \$rate_pool = array( 25 => .01, 24 => .02, ); \$level_pool = array( 25 => \$planets * \$rate_pool, 24 => \$planets * \$rate_pool ); I'll random pull a key from \$level_pool then i'll subtract from \$level_pool and when one of them are empty I remove the element;
8. Actually that idea doesn't work either. Cause then there will be like 20 level 10's close together in the galaxy. So I guess on that principal alone it has to be done with random functionsfunctions I'll just do that I guess. Unless someone has another idea
9. I figured out a solution. Using the last 3 digits of every Id I can say every 100 is level 25 planets Every number between 99 and 97 is level 24 planets So 1% of planets would be lvl 25 and 2% would be lvl 24 etc Whatever I want set each level too. That's a simple solution. Idk why it took me so long to think that idea up
10. The only real solution I came up with is using 25 random functions with stops so its as efficient as possible.
11. If I can come up with a solution that doesn't use random functions that be best. Wouldn't even need to assign it to the row. One kinda idea is using the first digits of a number with a T chart but idk.
12. Thanks for the reply requinix The problem I'm having isn't how to edit a MySQL data base It's figuring out a level of a planet so when I generate 10,000 planets or more each planet is given a level (1-25) After all 10,000 planets are inserted into the database. The end result will be that there is fewer level 2's than level 1's and so forth.
13. Hey guys I have a script I need to build and I'm trying to figure out the most efficient way to do it. Say I have 1000 rows in mysql (planets). Each row has an auto increment id I need to cycle through each row and add what level the planet is(1-25). I also need the more higher level a planet is to be more rare in the Galaxy. After coming up with two ideas both not efficient enough. I woke up today with a new idea but I need some help in completing the idea of it. Since each row has its own Id. I'm thinking that can be used to determine rareness of the level. Hoping a math guy here at phofreaks knows of a way I can play on the math with the id. Thanks
×

• #### Activity

• Chat
×
• Create New...