Hi @Alberto Acri ,
To calculate the new components of the normal vector (a, b, c) for additional P nodes provided in the 'coord' matrix, start extracting the normal components (a, b, c) for the existing P nodes from the 'circle' cell array. Assuming 'circle' contains the normal components in columns 3, 4, and 5 for each circular geometry, you can access them using indexing by iterating over the new P nodes in the 'coord' matrix. For each new P node, calculate the new normal components based on the circular geometry it belongs to. Then, use vector operations to compute the new normal components. Here is a sample code snippet to illustrate the process:
% Load the data
load('test_p.mat');
% Iterate over new P nodes in 'coord'
for i = 1:size(coord, 1)
% Find the corresponding circular geometry for the current P node
% Perform calculations to determine the new normal components (a_new, b_new, c_new)
% Example calculation (replace with actual computation)
a_new = 2 * circle{1, 3}; % Example: Doubling the 'a' component
b_new = circle{1, 4} - 1; % Example: Subtracting 1 from the 'b' component
c_new = circle{1, 5} + 3; % Example: Adding 3 to the 'c' component
% Display or store the new normal components for the current P node
disp(['New Normal Components for Node ', num2str(i), ': ', num2str([a_new, b_new, c_new])]);
end
Please see attached results.
Make sure to customize the calculations based on your specific requirements and data structure. Hope, this answers your question.