VRML surface conic projection

How can i do a conic projection of a surface in VRML format ?

6 commentaires

darova
darova le 7 Avr 2020
What about THIS?
andre padilla
andre padilla le 7 Avr 2020
My need is a little bit different:
(1) i already have a surface in VRML 2 format
(2) i want to do a conic projection of that surface
How to do that ?
A+
darova
darova le 7 Avr 2020
Try to search HERE
This is what google found for me. Is this correct?
andre padilla
andre padilla le 7 Avr 2020
Yes is a conic projection of the earth surface
But how to do that in MATLAB starting from another surface in VRML format ?
A+
darova
darova le 7 Avr 2020
Is this correct?
Do you know how the cone is situated?
andre padilla
andre padilla le 7 Avr 2020
Yes of course
i know where the cone is situated and what is its solid angle
and the distance from its top to the geometrical center of the surface
A+

Connectez-vous pour commenter.

Réponses (3)

darova
darova le 8 Avr 2020

0 votes

Here is an idea:
  • Projection onto cone: if your data in cartesian system - convert it to polar ()
New radius of projected data
  • Create flat projection:
New limits of angle:
New limits or radius:
See also HERE and HERE
andre padilla
andre padilla le 11 Avr 2020

0 votes

May be i did not sufficiently esplain the problem.
I generated in another software a colored surface of an arbitrary shape model (its not a sphere or an an ellipsoide ...)
This surface is in VRML 2 format.
I was wondering how it is possible to use a MATLAB function to generate a conic projection of this colored model surface.
Seems that existing MATLAB functions may produce conic projections of spheres or may be flatened spheroides
So these are not applicable for a random shaped objject. And one other problem is that those geographic MATLAB
functions do not read VRML format.
A+

3 commentaires

darova
darova le 11 Avr 2020
Where do you see a sphere?
andre padilla
andre padilla le 11 Avr 2020
Do you think that i can use this kind of strategy
MATLAB commands :
landareas = shaperead('landareas.shp','UseGeoCoords',true);
axesm ('eqaconic', 'Frame', 'on', 'Grid', 'on');
geoshow(landareas,'FaceColor',[1 1 .5],'EdgeColor',[.6 .6 .6]);
tissot;
Of course i have to convert
my_object_surface.wrl to my_object_surface.shp
How to do that ?
A+
darova
darova le 11 Avr 2020
Can you attach the data?

Connectez-vous pour commenter.

andre padilla
andre padilla le 11 Avr 2020

0 votes

Yes of course.
the file need to be renamed to .gz and gunziped
A+

3 commentaires

darova
darova le 11 Avr 2020
Please don't post new answer. Use existing one
I uploaded this program to read your file: LINK
Inside the program i changed this line (someone in comments to this script did the same)
keynames=char('Coordinate','point','coordIndex','color');
Then used this script to import to MATLAB and make a projection
[nel,w3d,infoline] = read_vrml1('myscene.wrl');
%%
cla
pts = w3d(1).pts;
fv.vertices = pts;
fv.faces = w3d(1).knx;
patch(fv,'facecolor','g')
a = 60;
[X,Y] = meshgrid(-20:20); % grid for cone
Z = 40-1/tand(a)*sqrt(X.^2+Y.^2); % Z coordinate of cone
surface(X,Y,Z,'facecolor','none','edgecolor','y')
[td,rd] = cart2pol(pts(:,1),pts(:,2)); % convert data to polar system
L0 = rd*sind(a) + (40-pts(:,3))*cosd(a);
r0 = L0 * sind(a); % new radius
zd = 40-L0 * cosd(a); % new Z coordinate
[xd,yd] = pol2cart(td,r0,pts(:,3)); % conert to cartesian
fv1.vertices = [xd yd zd];
fv1.faces = fv.faces;
patch(fv1,'facecolor','r')
light
axis vis3d equal
Unfortunately i didn't find a way to import colors
Honestly: looks like
Is it you wanted? Or you wanted flat projection?
andre padilla
andre padilla le 12 Avr 2020
thanks,
that is a first way i will try to find to get the colors
Many thanks
A+

Connectez-vous pour commenter.

Catégories

En savoir plus sur Polar Plots dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by