Greetings.
I can not get my "Ncoor" function to work, his work is the same as the program on the right (which has "x3i y3i" as a result), but I can not store the result in "x4i y4i" (as seen in the sheet ).
In summary what is expected is that the vectors x3, y3 should be equal to x4, y4 (as verification), but made with a function, where the value of "af" can change.
As well:
The program is used to find the coordinates of a figure given a line (given by the value "af") that cuts the figure from above, the problem is that I never get the first point (0,0) that should be (0.263, 0.7) m, for this case of coordinates, and for any case of coordinates it takes the value of the last point.
Only those two questions, thank you.
Solved! Go to Solution.
And here is a problem which should let you think about the algorithm you implemented.
In a program you don't use ranges but for-loops.
See if the attached helps.
This should solve the problem with the first, hard coded, point.
And here is a problem which should let you think about the algorithm you implemented.
I fixed it, with the considerations you gave me (I hope you do not have any errors now), thank you very much
You probably only fixed the error with the hard coded start coordinates (which were also missing the units) but not the problem which I drew attention to in my last post.
Look what still happens if you change the last argument to something like 65 cm. The green lines should be there, but aren't.
I attach two possible solution which you may adopt to your needs. I have chosen a matrix as file format for the polygon rather than separate x, y vectors and the height argument is measured from the bottom, not from the top. But all this can easily be changed to your needs.