Re: Spheres and surfaces
- From: "Sam B" <aint.no.sun.shine@xxxxxxxx>
- Date: Wed, 9 Jan 2008 17:08:02 +0000 (UTC)
"David " <dave@xxxxxxxxxxxxxx> wrote in message
<fm2rda$2m1$1@xxxxxxxxxxxxxxxxxx>...
"Sam B" <aint.no.sun.shine@xxxxxxxx> wrote in message
<fm2q26$rvb$1@xxxxxxxxxxxxxxxxxx>...
Hello all,there
I'm doing a Dissertation and I'm attempting to create a
model of a probability system... I would like to explain
further, but it's a little difficult to do so, but if
is any need for clarification I will indulge as far as Iam
able.
Essentially I'm attempting to crate a sphere with a
roughened surface and my current function looks like:
wow, a 2-fer... just used most of the same code for the
previous poster. this one is much more fun though.
result below makes a sphere roughened by a random radius.
even if it isn't what you want it is fun to look at!
scale=10;
%plot a sphere with radius scale
load('topo.mat','topo','topomap1');
[X,Y,Z]=sphere(24);
X=X*scale;
Y=Y*scale;
Z=Z*scale;
%convert to spherical coords
[T,P,R]=cart2sph(X,Y,Z);
%project onto surface of sphere by making radius constant
R=R+randn(size(R));
%convert back to cartesian for plotting
[Xr,Yr,Zr]=sph2cart(T,P,R);
h = surface(Xr,Yr,Zr,'FaceColor','texture','CData',topo);
rotate(h,[0 0 1],180)
colormap(topomap1)
appreciate the help David, it sure is an interesting little
function and I'm in the midst of playing around with it to
fit my model.
I'll try and explain the second of my queries a little
further in case it helps anyone else offer advice.
I have a volume that for all intents and purposes we can
expect to be infinite space.
I want to populate this space with a specific set of
membranes at discrete points along the Z axis, so to
reiterate my example :
Z = [1 2 3 4 5 6]
N = [1 4 8 16 32 64]
where N = the number of points on the surface:
S1 = [X1 Y1 1]
S2 = [X1 Y1 2;X2 Y2 2;X3 Y3 2;X4 Y4 2]
S3 = [X1 Y1 3;...X8 Y8 3]
S4 = [X1 Y1 4;...X16 Y16 4]
S5 = [X1 Y1 5;...X32 Y32 5]
S6 = [X1 Y1 6;...X64 Y64 6]
such that Xn and Yn are in the range -n to n
I then want to contour these membranes with a normally
distributed set of 2^n data points, representing a
probability - so in the range -1 to 1.
I think I may be close to getting what I want, but I just
thought I'd reply and clear my head
Thanks again for the help
.
- Follow-Ups:
- Re: Spheres and surfaces
- From: David
- Re: Spheres and surfaces
- References:
- Spheres and surfaces
- From: Sam B
- Re: Spheres and surfaces
- From: David
- Spheres and surfaces
- Prev by Date: incompatibility Vista matlab2007b
- Next by Date: Re: incompatibility Vista matlab2007b
- Previous by thread: Re: Spheres and surfaces
- Next by thread: Re: Spheres and surfaces
- Index(es):
Relevant Pages
|