Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédente | Dernière révisionLes deux révisions suivantes | ||
back2root:archives:denthor:part-03 [2023/05/18 20:35] – frater | back2root:archives:denthor:part-03 [2023/05/18 20:55] – [Line algorithms] frater | ||
---|---|---|---|
Ligne 109: | Ligne 109: | ||
{{drawio> | {{drawio> | ||
- | |||
- | Ie. o (X1,Y1) | ||
- | ooooooooo | ||
- | | ||
- | oooooooo | ||
Again, sorry about my drawings ;-) | Again, sorry about my drawings ;-) | ||
Ligne 150: | Ligne 145: | ||
{{drawio> | {{drawio> | ||
- | |||
- | o | ||
- | o | ||
- | o | ||
Instead of this : | Instead of this : | ||
{{drawio> | {{drawio> | ||
- | ooo | ||
- | ooo | ||
- | ooo | ||
Well, the solution is as follows : | Well, the solution is as follows : | ||
- | {{drawio>back2root: | + | <code> |
- | + | *\``|``/* | |
- | | + | ***\|/*** |
- | | + | ----+---- |
- | | + | ***/|\*** |
- | | + | */``|``\* |
- | | + | </ |
If the slope angle is in the area of the stars (*) then use the first equation, if it is in the other section (`) then use the second one. | If the slope angle is in the area of the stars (*) then use the first equation, if it is in the other section (`) then use the second one. | ||
What you do is you calculate the variable on the left hand side by putting the variable on the right hand side in a loop and solving. Below is our finished line routine : | What you do is you calculate the variable on the left hand side by putting the variable on the right hand side in a loop and solving. Below is our finished line routine : | ||
+ | |||
+ | === function: === | ||
<code pascal> | <code pascal> |