VRML surface conic projection
古いコメントを表示
How can i do a conic projection of a surface in VRML format ?
6 件のコメント
andre padilla
2020 年 4 月 7 日
andre padilla
2020 年 4 月 7 日
darova
2020 年 4 月 7 日
Is this correct?

Do you know how the cone is situated?
andre padilla
2020 年 4 月 7 日
回答 (3 件)
darova
2020 年 4 月 8 日
0 投票
andre padilla
2020 年 4 月 11 日
0 投票
3 件のコメント
darova
2020 年 4 月 11 日
Where do you see a sphere?

andre padilla
2020 年 4 月 11 日
darova
2020 年 4 月 11 日
Can you attach the data?
andre padilla
2020 年 4 月 11 日
0 投票
3 件のコメント
darova
2020 年 4 月 11 日
Please don't post new answer. Use existing one
darova
2020 年 4 月 11 日
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
2020 年 4 月 12 日
カテゴリ
ヘルプ センター および File Exchange で Coordinate Reference Systems についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

