Join for FREE | Take the Tour Lost Password?

deviantART

 
About Me Official Beta Tester Programmer psykopath20/Male/Australia Recent Activity Deviant for 5 Years
13 Month Premium Membership
Statistics 129 Deviations
2,573 Comments
16,720 Pageviews

Some maths pointers plz?

Sun Sep 20, 2009, 1:23 AM
<UPDATE 20/09>
The approach I'm going with is plot half my shapes (I'm using circles now, I can put squares inside them later on) onto a circle, project them out to make half a sphere, repeat for the other half.

Well, I just now finished a way to plot my shapes into a circle, using the smallest area possible. It doesn't make a perfect circle, but that's even better IMO. But, I get 40% CPU usage on my quad core.

Live demo:[link]
Source:[link]

</UPDATE 20/09>




The steps I wanna do:

Say I have n squares (or circles if its easier)
 of a set size (x radius for circles, or x*x squares)

Find the size/radius of a sphere large enough to have the n squares plotted on its surface without overlapping

Plot those points


I think I have the math down for calculating the size, but what's the best way to go about plotting the centers of squares? Links to references or whatever much appreciated, google is failing me.


UPDATE
Thanks for input guys, what do you think about this idea, is it do-able?

What if I take half the squares/circles, and fill a circle with them. Then project these points out so I have half a sphere. Repeat for the other half of my squares, rotate it 180, and I have a full sphere?

I'll start on this later, right now I need to go get some grocerys, mow the lawn, and finish the washing. Fun fun fun.

ANOTHER UPDATE
IDEA NUMBER 2
Somehow on the fly create a 3d-psuedomodel with n faces. The faces don't need to be any specific shape, because I would just need the center of each face, and maybe their rotation. Hmm. What do I google to find this?

deviantID

Wii Monster Lab Friend Code: 5284 8187 7372

http:­//whit3rabbit­.mybrute­.com

Devious Info

  • Current Residence: NSW Australia
  • Interests: Programming, Entheogens, Partying
  • Favourite movie: Niagara Niagara, Almost Famous
  • Favourite band or musician: My musical taste does not define me, but
  • Favourite genre of music: you can check what I'm listening to here http://last.fm/user/psykopath
  • Favourite poet or writer: Philip K Dick, Dean Koontz
  • Operating System: Vista / Linux Mint
  • Favourite game: Any good rpg
  • Favourite cartoon character: ATHF
  • Personal Quote: i'll shit in your coffee
  • Tools of the Trade: Gloves,rope,taser,pepper spray,handgun,ski mask,bottle opener,duct tape
http://www.shiftunderscore.com

Comments


:icondraco-samhain:
Thanks for the fav on Hotel Tassel Stairwell!
:iconpsykopath:
No probs, its awesome :D ; hard to believe its a vector scene.

--
overabundance causes confusion of time versus necessity.hurry, only 6 seconds to go.repeat as necessary.
:icondraco-samhain:
^.^ It is indeed! I stare at it constantly thinking the same thing even though I laid down all the points to the dismay of my poor hand clicking each one! XD I have another scene that I have been procrastinating on....mostly because it involves a lot of glass that I've already finished and just sit and stare at each time I open the file....>.> So much for productivity! I should do boring parts first next time...*nods*
:iconjavamocha:
thanks a lot for the fav on [link]

--
I'm never lost, i just know where i am with less precision.
:iconmajomango:
Fascinating avatar. Completely catched my eye lol :D

--
...: Always a dreamer :...

Member of *CelebrityPortraits
:iconadelaisaer:
Hey, thanks for the coding help.

There is a problem, though. From the right, it floats nicely; but from the top, it doesn't - it's all the way in the bottom for some reason.

--
One who prefers their own Elysium, a collected being of brilliant ambiance and nurturing.
:iconpsykopath:
are you using float or absolute positioning?
absolute positioning should work from anywhere (unless its parent element has position:relative)
if your floating it, maybe try putting it before your table in the source.
otherwise, ask this question in the programming forum :p

--
overabundance causes confusion of time versus necessity.hurry, only 6 seconds to go.repeat as necessary.
:iconadelaisaer:
Nevermind; tried putting the coding at the top of the code-page, and it worked. Because before, I put it all the way in the bottom, lol.

--
One who prefers their own Elysium, a collected being of brilliant ambiance and nurturing.
:iconpsykopath:
Heh, I didn't notice your reply, glad you got it working.

--
overabundance causes confusion of time versus necessity.hurry, only 6 seconds to go.repeat as necessary.

Site Map