From e2fee30f901d11d0897655f032539b31758bbc1e Mon Sep 17 00:00:00 2001 From: Andinus Date: Sat, 9 Oct 2021 22:09:29 +0530 Subject: Add working DDA Algorithm --- src/algorithms/line-drawing/DDA.svelte | 108 ++++++++++++++++++++++++++------- 1 file changed, 86 insertions(+), 22 deletions(-) (limited to 'src') diff --git a/src/algorithms/line-drawing/DDA.svelte b/src/algorithms/line-drawing/DDA.svelte index db2070a..b2cc558 100644 --- a/src/algorithms/line-drawing/DDA.svelte +++ b/src/algorithms/line-drawing/DDA.svelte @@ -1,12 +1,47 @@

Digital differential analyzer

@@ -20,24 +55,53 @@   +
+ -
- - -
- - -
- - - -
- - -
- - -
+ +{#if solved === true && steps > 0} +
+ +
+ + +
+ + + +
+ + +
+ + +
+ + + + + + + + + + + + + + {#each x_axis as _, i} + + + + + + + + {/each} + + +
Iterationxyx (plot)y (plot)
{i + 1}{x_axis[i]}{y_axis[i]}{x_axis_floored[i]}{y_axis_floored[i]}
+{/if}