# transform infinite plane into finite circular plane

3 visualizzazioni (ultimi 30 giorni)
Alberto Acri il 24 Set 2023
Modificato: Bruno Luong il 25 Set 2023
Is it possible to generate a plan of limited dimensions, for example a 10x10 square?
line = importdata("line_w.mat");
normal = importdata("normal_w.mat");
row = 10; % variabile
P = line(row,:);
plane = normal(row,:);
a=plane(1); b=plane(2); c=plane(3);
d=dot(plane,P);
figure
plot3(line(:,1),line(:,2),line(:,3),'r.','Markersize',10);
hold on
plot3(P(:,1),P(:,2),P(:,3),'b.','Markersize',15);
fimplicit3(@(x,y,z) a*x+b*y+z*c-d)
hold off
axis equal
xlabel('x')
ylabel('y')
zlabel('z')
xlim([0 50])
ylim([-50 20])
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Risposta accettata

Matt J il 24 Set 2023
Modificato: Matt J il 24 Set 2023
You can use patch.
[a,b,c]=deal(1); %fake input data
P=[1 1 1];
R=2;
t=(0:359)';
V=R*[cosd(t),sind(t)]*null([a,b,c])' + P(:)';
patch(V(:,1), V(:,2),V(:,3),'r'); axis square
view(40,25); grid on
##### 6 CommentiMostra 4 commenti meno recentiNascondi 4 commenti meno recenti
Alberto Acri il 25 Set 2023
I would not know. At the moment any orientation is fine.
Bruno Luong il 25 Set 2023
Modificato: Bruno Luong il 25 Set 2023
[a,b,c]=deal(1); %fake input data
P=[1 1 1];
% ellipse principla axis lengths
R1=1;
R2=5;
t=(0:359)';
V=[cosd(t),sind(t)]*diag([R1,R2])*null([a,b,c])' + P(:)';
patch(V(:,1), V(:,2),V(:,3),'r'); axis square
view(40,25); grid on

Accedi per commentare.

### Più risposte (1)

Image Analyst il 24 Set 2023
Perhaps try rescaling the appropriate variables with rescale.
##### 1 CommentoMostra -1 commenti meno recentiNascondi -1 commenti meno recenti
Alberto Acri il 24 Set 2023
Modificato: Alberto Acri il 24 Set 2023
Thanks for the response. Could you tell me how to obtain the matrix to use in 'rescale'?
Also, is it possible to generate, on that plane created with fimplicit3, a circular-shaped plane defined by the radius R?

Accedi per commentare.

### Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

R2021b

### Community Treasure Hunt

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

Start Hunting!

Translated by