Add nodes (3D) placed at a distance H from starting nodes (3D)

2 visualizzazioni (ultimi 30 giorni)
Hi! Is there any way to generate other red coordinates on the same plane and with a distance H = 0.1 from the black coordinates ?
C_or = importdata("C1_or.mat");
C_new = importdata("C1_new.mat");
P = [25.9349 -15.0445 77.3427];
% C_or = importdata("C3_or.mat");
% C_new = importdata("C3_new.mat");
% P = [28.73645 -15.2786 69.24005];
hold on
hold off
axis equal
The second figure is the expected result.

Risposte (1)

Walter Roberson
Walter Roberson il 29 Set 2023
For any particular grouping:
Subtract the mean() of the coordinates in order to shift the coordinates to be relative to the centroid. Then use cart2pol to get angle and distance relative to the centroid. Add the offset to the distance, and then pol2cart . Add back the coordinates of the centroid to get the new coordinates.
  3 Commenti

Accedi per commentare.


Scopri di più su Graphics Object Programming in Help Center e File Exchange




Community Treasure Hunt

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

Start Hunting!

Translated by