I am trying to map a hemisphere to a circle, i.e getting subplot
(1,2,2) from subplot(1,2,1) of the code below. Is there a set
transformation matrix that exist to do this mapping without needing to
specify view([0 90]) ?
My overall task is to fill each square or even trapezoid on the
'walls' of the hemisphere with an image and then project them to a 2D
circular image. I am not quite sure how to do that! Any advice on the
data structures and transformations to use will be greatly
appreciated.
----------------------
n = 18; % n is the number of points in the drawing of the sphere.
R = 1; % radius
theta = 2*pi*(0:n)/n; %polar angle
phi = (pi/2)*(0:3:n)'/n; % azimuthal angle
r = R*cos(phi);
% Parametric Equation of a sphere X(r,theta,phi),Y(r,theta,phi),Z
(r,theta,phi):
xsphere = r*cos(theta);
ysphere = r*sin(theta);
zsphere = R*sin(phi)*ones(size(theta));
%Plots
subplot(1,2,1)
surf(xsphere,ysphere,zsphere);
axis equal
subplot(1,2,2)
surf(xsphere,ysphere,zsphere);
view([0 90]);
grid('off')
|
|
0
|
|
|
|
Reply
|
viv3kg (13)
|
12/14/2009 11:24:46 AM |
|
On 14 Des, 12:24, "Jean V.G" <viv...@gmail.com> wrote:
> I am trying to map a hemisphere to a circle, i.e getting subplot
> (1,2,2) from subplot(1,2,1) of the code below. Is there a set
> transformation matrix that exist to do this mapping without needing to
> specify view([0 90]) ?
The 'simplest' way that did not manipulate VIEW would
be to disregard the z coordinate, and use PATCH to
plot the individual faces in the (x,y) plane. This
*can* be done without using VIEW, but it is far simpler
for you to just set the z coordinate to 0 and use VIEW.
Rune
|
|
0
|
|
|
|
Reply
|
Rune
|
12/14/2009 11:34:22 AM
|
|
|
1 Replies
722 Views
(page loaded in 0.378 seconds)
Similiar Articles: 3D to 2D projection - comp.soft-sys.matlabI am trying to map a hemisphere to a circle, i.e getting subplot (1,2,2) from subplot(1,2,1) of the code below. Is there a set transformation matrix... 3d to 2d projection - comp.graphics.api.openglHow do I Get information on where a certain point in space would be projected on screen according to the current Modelview and Perspective matrices? A... Drawing a 2D-Grid - comp.graphics.api.openglHi I need to draw a two-dimensional Grid with OpenGL. I do not need any 3D-projection. So, how do I draw lines, and how to do it in 2D? Thanks in ad... Display 2D circle on "screen" over 3D scene - comp.graphics.api ...Draw 3d objects first then disable depth test and change the matrices // draw 3d stuff // SWITCH to 2D MODE glMatrixMode(GL_PROJECTION); glPushMatrix ... 3d volume to 2d - comp.soft-sys.matlab3d to 2d projection - comp.graphics.api.opengl 3d volume to 2d - comp.soft-sys.matlab Problem with 3d to 2d projection - comp.soft-sys.matlab 3d volume to 2d - comp.soft ... convert 3D matrix into 2D - comp.soft-sys.matlab3D to 2D projection - comp.soft-sys.matlab convert 3D matrix into 2D - comp.soft-sys.matlab Problem with 3d to 2d projection - comp.soft-sys.matlab 3d to 2d projection ... greyscale 2D image to 3D autocad file - comp.soft-sys.matlab ...3d to 2d projection - comp.graphics.api.opengl greyscale 2D image to 3D autocad file - comp.soft-sys.matlab ... 3d to 2d projection - comp.graphics.api.opengl greyscale 2D ... how to create projections for a 3d object - comp.soft-sys.matlab ...3D to 2D projection - comp.soft-sys.matlab 3D to 2D projection - comp.soft-sys.matlab I am ... graphics.api.opengl 3D to 2D projection - comp.soft-sys.matlab Information ... Information required on projected 3D graphical objects - comp ...3D to 2D projection - comp.soft-sys.matlab Information required on projected 3D graphical objects - comp ... 3D to 2D projection - comp.soft-sys.matlab Information ... Convert 3D images to 2D - comp.soft-sys.matlabProblem with 3d to 2d projection - comp.soft-sys.matlab I have a data group (xi,yi,zi) which is an arch. These data are on the CCD plane. I know the pixel size and CCD size. 3D projection - Wikipedia, the free encyclopedia- the 2D projection of . When and the 3D vector is projected to the 2D vector . Otherwise, to compute we first define a vector as the position of point A with respect to a ... 3D to 2D projection by Crisp - MultiMania - Votre site web gratuitby Crisp/Planet Jazz (april 1999) corrections by Scout (*) (may 1999) Introduction This tutorial is aimed at explaining you how you can project a 3 dimensional point ... 7/23/2012 7:11:16 AM
|