Message Boards Message Boards

0
|
6951 Views
|
4 Replies
|
3 Total Likes
View groups...
Share
Share this post:

How to show/plot 3D spheres randomly?

Hello - newbie here; use very old Rev of Mathematica; am attempting to generate multiple random 3D spheres for molecular and/or astronomical simulations. I am familiar process for generating random "points", "lines", "polygons" and "cuboids". (see below - & attach)

rcoord := {Random[ ], Random[ ], Random[ ]}

Show[Graphics3D[ Table[Cuboid[10 rcoord], {18}] ]

However, am unfamiliar w/'commands'/methodology to produce 'spheres' of any given radius/color. I wud guess that I could use - " ParametricPlot3D[ {Cos[t]...[u]...Sin[t]...[u] ... " after the 'rcoord' input; or, possibly the " SphericalPlot3D[ r, {theta...}, {phi... ] ?? (I could probably have tried these above < time than this silly message !!!! )

Thx for any assistance.

Attachments:
4 Replies
POSTED BY: Marco Thiel

Hello again Marco -

Attempted ur code; got lotsa errors. Possibly YOUR Mathematica is new[er] & has additional subroutines/commands. I neglected to explain that I am running Rev 2.2 (student version when taking some additional grad courses) - see attached details of the Rev/Build # :

Also, although I don't believe it is really a factor, I am running several 'older versions' of Windows in Virtual Machines under Win7/Pro/64-bit. The Rev # under which I am running Math 2.2 is Win XP - see 2nd attach.

(also attached copy of the Mathematica notebook page showing my abominable attempts...) Sorry to bother. Thx again !!!

Attachments:

Marco - Just logged on again; see ur rather sophisticated 'rendering' !! Thank u !!! I use Mathematica 2.2 & frankly haven't even looked up ur 'instruction set'/command. Not sure I even HAVE 'bouncing' ; however, will try later 2-nite. THX again !!! RPP

Hi,

try

Graphics3D[Sphere[RandomReal[1, {10, 3}], 0.1]]

enter image description here

Cheers,

Marco

POSTED BY: Marco Thiel
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract