Can anyoane tell be if it is possible to buil in Matlab an offset for a curve ? If yes, which is the approche ? This is what I got until now. I think the offset is changing because of the concavity.
Thank you very much in advance.

 채택된 답변

Star Strider
Star Strider 2017년 2월 23일

0 개 추천

See if this does what you want:
x = [10 30 10 25]; % Create Data: Original
y = 10 : 20 : 70; % Create Data: Original
xof1 = x - 2; % Create Data: Negative Offset
xof2 = x + 2; % Create Data: Positive Offset
figure(1)
plot(x, y)
hold on
plot(xof1, y)
plot(xof2, y)
hold off
axis([-20 60 10 70])

댓글 수: 4

Andries Paula
Andries Paula 2017년 2월 24일
편집: Andries Paula 2017년 2월 24일
Hey,
Thank you very much for your response.
yes, but if I am trying with this coordinates the offsets are not parallel lines anymore. I think I need to use formulas for gradient and radius of curvature.
x=1:100;
y=sin(x);
xof1 = x - 2;
xof2 = x + 2;
Star Strider
Star Strider 2017년 2월 24일
My pleasure.
The curves are now offset in the y-direction.
What do you want to do, and how do you want to calculate ‘Inner Parallel’ and ‘Outer Parallel’?
What do they represent?
Is it a regression curve with confidence intervals?
Andries Paula
Andries Paula 2017년 2월 24일
Hey,
I have coordinates ( X and Y ) for a road, and I need to draw right and left offsets to the road lines. I wrote a program using the gradient, normal vector, cancavity and the radius of curviture, but the result it is not correct.
Star Strider
Star Strider 2017년 2월 24일
Road design is not an area of my expertise. I have no idea what the constraints and other problems are.
You may need to use more points to approximate your road centre-line and the parallels.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Vehicle Scenarios에 대해 자세히 알아보기

질문:

2017년 2월 23일

댓글:

2017년 2월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by