Commit Graph

362 Commits

Author SHA1 Message Date
hasufell dc137d55de
Update project name 2014-10-15 22:50:39 +02:00
hasufell 42dc0c4a1b
DIAGRAM: use (<>) instead of mappend 2014-10-14 21:24:21 +02:00
hasufell 0379463db4 DIAGRAM: fix drawing for negative coordinates
Applying the filter function too late seemed to cause
glitches in convexHStepsLs for negative coordinates.
We should only pass the filtered list of points to
the graham scan.
2014-10-14 10:56:06 +02:00
hasufell 873af1cfec
Add another test file 2014-10-13 23:01:37 +02:00
hasufell 9751f0f7d6
Add a simple performance test with a big obj file 2014-10-13 22:35:01 +02:00
hasufell 9dcf1e30f9
PRELUDE: add if' function to simplify if-then-else 2014-10-13 22:30:57 +02:00
hasufell 077d0442f5
ALGO: improve style 2014-10-13 22:30:19 +02:00
hasufell 8300929fd7
ALGO: refactor
Move sortedXY to Vector.hs, fix shadowing of scanH.
Simplified grahamCHSteps by making use of a more generalized scanH
function.
2014-10-13 22:06:12 +02:00
hasufell 09eeaeda27
Refactor function names, split out some functions 2014-10-13 20:14:50 +02:00
hasufell d87dc25d26
DIAG: fix white rectangle border
For bigger dimensions 10 is not enough, so take 10 as percentage.
2014-10-13 19:58:09 +02:00
hasufell 7a7bfaa1be
Improve style 2014-10-13 19:53:33 +02:00
hasufell edde93ec77
ALGO: improve function names 2014-10-13 19:50:02 +02:00
hasufell 7cdb867cf4
ALGO: Split scanH out and make the graham API more modular 2014-10-13 19:49:53 +02:00
hasufell 67ef9fa223
VEC: fix "defaulting... constraint to type Integer" warning 2014-10-13 19:15:09 +02:00
hasufell 0dff1174f2
VEC: style 2014-10-13 19:14:25 +02:00
hasufell 2c1d5fa5ec Improve redability, add docs 2014-10-13 03:25:22 +02:00
hasufell 87393af71a
Make Gif animation more nice, TODO: IMPROVE CODE 2014-10-13 02:58:18 +02:00
hasufell 4936023c14
VEC: fix orientation, it was swapped 2014-10-13 02:30:11 +02:00
hasufell f82c948055
ALGO: Improve readability by introducing notcw 2014-10-12 20:37:24 +02:00
hasufell be2787103a
GUI: don't show error dialogs if there hasn't been any file chosen 2014-10-12 20:00:42 +02:00
hasufell 56ea542535
ALGO: fix generation of gif
This is a good guess... the maximum of possible steps shouldn't
be higher than twice the length of the points.
2014-10-12 19:22:37 +02:00
hasufell 37b38115ae
ALGO: fix algorithm to show collinear points as part of the hull
There was also a bug to be fixed when doing this. We missed
an important pattern match case which casued wrong results.
2014-10-12 19:19:44 +02:00
hasufell bfcc9bfdf7
ALGO: improve redability and style, add pseudo code
We also slightly changed the behavior of the algorithm and
now split it at 3 elements. It doesn't matter complexity wise
and improves readability a bit.
2014-10-12 18:44:48 +02:00
hasufell d3a7c04398
PRELUDE: simplify seqList 2014-10-12 16:09:17 +02:00
hasufell 7a73ea7a1d
GUI: correct window title to CG2 2014-10-12 15:14:26 +02:00
hasufell f0789b59e3 GUI: set window title 2014-10-12 04:23:27 +02:00
hasufell 43f618269d GUI: update version in about dialog 2014-10-12 04:23:16 +02:00
hasufell 393d37d1a9
GUI: don't redraw instantly on scaling point thickness
It broke performance.
2014-10-12 03:15:34 +02:00
hasufell e91fb6cd1e
ALGEBRA: fix ccw 2014-10-12 03:04:36 +02:00
hasufell 378f7887d4
PRELUDE: add getLastX 2014-10-12 03:00:55 +02:00
hasufell cc7efa9906
ALGO: improve style 2014-10-12 03:00:25 +02:00
hasufell b75f531533
ALGO: fix grahamGetCHSteps 2014-10-12 03:00:13 +02:00
hasufell 15479e3c58
PRELUDE: add dupLast 2014-10-12 02:57:43 +02:00
hasufell b3371d16f9
PRELUDE: add seqList 2014-10-12 02:31:08 +02:00
hasufell 6dc4fae415
ALGO: improve readability 2014-10-12 02:11:47 +02:00
hasufell 24810e5970
Move the function 'first' from Parser to MyPrelude
It is useful and generic.
2014-10-12 01:57:20 +02:00
hasufell 60f59bb2b7
ALGO: fix the algorithm
It was imprecise before and only worked by accident.
'grahamGetCHSteps' is a bit broken for now and caused duplicates.
2014-10-12 01:54:44 +02:00
hasufell d81e932d00 DIAGRAM: improve behavior for dimensions like (100,300) (100,300) 2014-10-11 13:49:53 +02:00
hasufell 6c66a7acb3 PARSER: add parser for negative doubles 2014-10-11 04:39:51 +02:00
hasufell 7fb3588300
DIAGRAM: improve style and readability 2014-10-11 03:59:21 +02:00
hasufell bfa3665985
DIAGRAM: fix grid/axis for negative dimensions 2014-10-11 03:24:18 +02:00
hasufell 5e5f305c65
GUI: merge callback functions into drawDiag/saveDiag 2014-10-11 02:01:17 +02:00
hasufell 0681b4d605
GUI: remove code duplication 2014-10-11 00:16:18 +02:00
hasufell 869cbd0af3
GUI: instantly redraw for enabling checkboxes and other stuff 2014-10-11 00:02:06 +02:00
hasufell b6aa9d9086
GUI: fix signal handling for onExpose
Doing the signal handling connect inside the callback function
was a bad idea. Instead do it in the makeGUI function and just
call onClickedDrawButton for every expose event.
2014-10-11 00:01:43 +02:00
hasufell ab2a0a331d
DIAGRAM: fix unfiltered vtable for pointText functions 2014-10-10 23:59:02 +02:00
hasufell 60843e5879
DIAGRAM: rm unnecessary square 2014-10-10 23:28:01 +02:00
hasufell eadbf76978
CABAL: rm unnecessary dependency from Gtk executable 2014-10-10 18:02:26 +02:00
hasufell 40313baa7d
CABAL: add missing JuicyPixels 2014-10-10 17:55:52 +02:00
hasufell 8494c106d9
Update .gitignore 2014-10-10 17:53:17 +02:00