X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fdocuments.git;a=blobdiff_plain;f=irc%2F%23ipdf.log;h=60fd46c9492db5589bef9dcb350e6537746516aa;hp=0be461e0473978631046f965c841e420ee406549;hb=da74d1e7bf022062c34223e1e20fd97599e294dd;hpb=1af0c07c5cecd52e17e29d8ff0f4aff5e67b2f39 diff --git a/irc/#ipdf.log b/irc/#ipdf.log index 0be461e..60fd46c 100644 --- a/irc/#ipdf.log +++ b/irc/#ipdf.log @@ -3813,3 +3813,193 @@ 21:15 < matches> I hope that's not the conference abstract 21:15 < matches> I also really hope we're allowed to use our own computer and things in the conference 21:16 < matches> Also I really hope that if I can use my own computer it doesn't decide to shit itself anyway just to spite me +--- Day changed Mon Aug 18 2014 +17:06 < matches> Good news and bad news! +17:07 < matches> The kerning now appears to kern in the right direction +17:07 < matches> But this means "BleedingCowboys.ttf" works +20:30 < sulix> It's a pain to look up clipping of beziers, because there's a separate technique for doing something else called "bézier clipping" +20:40 < matches> Baha +20:41 < matches> I'm basically just procrastinating with Qt +20:41 < matches> I mean +20:41 < matches> Doing *awesome* things with Qt +20:48 < sulix> I am looking with considerable envy at SolveQuadratic(). +20:49 < sulix> SolveCubic() will get very ugly. +20:49 < sulix> Assuming I don't just sample the cubic at 100 points and look for roots. +20:49 < matches> Haha +20:49 < matches> Newton Raphson? +20:50 < sulix> Very tempting. +20:50 < matches> Then you can solve any bezier! +20:50 < matches> Then we can put in Quintics! +20:50 < sulix> Solving cubics exactly is not fun. +20:50 < sulix> Dear god no. +20:50 < matches> Imagine how many loops a quintic could have... +20:51 * sulix cries quietly in the corner. +20:53 < matches> So I'm calling AddText with sane values and nothing is happening :( +20:56 < sulix> With or without quadtree? +20:56 < sulix> With quadtree, everything is broken if you try adding things. +20:56 < sulix> Because they won't be added to a node. +20:57 < matches> No quad trees I think +20:57 < matches> Yeah no quad tree +21:00 < matches> Wait I think we need to rebuild the buffers or something +21:07 < matches> Ah, ForceRenderDirty() +21:14 < matches> I don't think the scale of our text is quite right? +21:14 < sulix> Well, the scale of everything is wrong, but it's entirely possible that the text is _extra wrong_ +21:16 < sulix> In theory, the "scale" input to addText is the "height" of a character. +21:19 < matches> Mmm +21:19 < matches> I'm trying to add text relative to the current view +21:19 < matches> But it isn't consistent +21:19 < matches> When I go to a different view it is definitely not adding it in the same relative place +21:20 < matches> The scale and positions aren't *already* relative are they? +21:22 < sulix> Not to the view... +21:24 < matches> What are they relative to? +21:24 < matches> Anyway instead of fixing that bug I'm adding more +21:25 < sulix> Umm... The bounding box maybe? +21:25 * sulix investigates. +21:26 < sulix> Scale and position should (I think) be normal, document coordinates. +21:26 < matches> Odd +21:26 < matches> Oh well +21:26 < matches> Having Qt is totally worth it by the way +21:27 < matches> Although it is still slightly embarrassing that it has its own SVG parser +21:27 < matches> Ours is better! +21:27 < matches> It has Reals everywhere! +21:27 < matches> Except where it constructs Real from floats... +21:27 < matches> And converts them to floats... +21:28 < sulix> Thesis title should be "Keepin' it real: Staying afloat on the sea of document precision" +21:31 < matches> Bahaha +21:31 < matches> That is brilliant +21:32 < matches> The Qt stuff is never deleting anything +21:32 < matches> I suppose I should fix that at some point +21:33 < matches> So basically it is a state machine and you use the menu to change the state +21:33 < matches> Pressing OK does something depending on the state +21:34 < matches> And there is a single text edit you can type stuff into +21:34 < matches> In theory it can hide/show different widgets depending on the state +21:34 < matches> I feel like I should add a "Generate Thesis Title" widget now... +21:35 < matches> Also I can sort of see the appeal of lambdas for GUI programming now +21:35 < matches> But I have a feeling they would totally break Qt anyway +21:49 < matches> ... +21:49 < matches> Ok sometimes the text gets added upside down... +21:49 * sulix disclaims any and all responsibility for that. +21:51 < matches> Yes! +21:51 < matches> I finally did that thing I was saying I'd do for like 3 weeks +21:51 < matches> Zoom in to floating point limit +21:51 < matches> Add SVG +21:51 < matches> Watch it explode! +21:52 < sulix> Oooh... +21:52 < matches> It is glorious +21:54 < matches> We need to be a bit careful with thread safety in qt +21:55 < matches> Really we should be able to request that the qt thread call UpdateAll itself +21:55 < matches> Rather than calling it directly from the viewer thread +21:55 < matches> But I'm not sure how that's done +21:55 < matches> There's all this stuff about "Cross thread signals" on the internet +21:56 < matches> It seems you can hide/show things but not much else +22:47 < matches> Bah you pushed things! +22:55 * sulix proclaims the new features as excellent and promptly goes to bed. +--- Day changed Tue Aug 19 2014 +18:08 < matches> My conference is in the week starting 13th October +18:08 < matches> Is Tim back then? +18:08 < matches> "your supervisor will be invited to attend and mark your presentation" +18:09 < matches> So if he can't go... I don't get a mark? +18:12 < matches> It sounds suspiciously like they are going to get everyone's supervisors to mark them and then just scale everyone :S +18:13 < matches> Surely at least one other person is going to read the final report... +18:13 < matches> I've heard bad things about the engineering scaling system +18:14 < matches> Your mark becomes inversely proportional to how well your supervisor's students did the previous year or something like that +18:15 < matches> Anyway, two months left to accomplish something! +20:05 < sulix> Worked out why the font bounds were weird. +20:06 < sulix> AddText takes (msg, scale, x, y) not (msg, x, y, scale), so the coordinates were all bunk. +20:09 < sulix> Fonts looks _amazing_ with floating pt errors, too. +20:09 < sulix> http://davidgow.net/stuff/ipdf-i-think-you-mean-comic-fail.png +20:29 < sulix> The Art of Computer Programming briefly mentions the Stern-Brocot tree, btw. +20:29 < sulix> I can't see it being really useful, though. +21:06 < sulix> My difficulty clipping bézier paths may be because it is actually impossible. +21:06 < sulix> I think I've just found a paper saying that it is only possible for béziers which happen to be straight lines. +22:55 < sulix> Never mind, it is possible, it's just very nasty. +23:15 < sulix> Also C++14, because we need more lambdas: https://isocpp.org/blog/2014/08/we-have-cpp14 +--- Day changed Wed Aug 20 2014 +12:05 < matches> I guess we've accomplished the goals for this week's meeting then! +12:05 < matches> (That shading algorithm totally counts as a "first attempt") +12:07 < sulix> I'm about 2/3rds of the way through deriving the reparametrisation of béziers. +12:08 < sulix> It basically just boils down to pages and pages of rearranging polynomials. +12:38 < sulix> I managed to get the qt4/qt5 monstrosity compiling on my laptop. +12:38 < sulix> It has a "moc-qt4" program, which works, whereas "moc" is qt5. +16:28 < matches> I think I need to stop adding this log to git... +23:08 < sulix> matches: But then, how would history record that I've finally got a maybe-correct derivation for cubic bézier reparametrisation: http://davidgow.net/stuff/cubic_bezier_reparam.pdf +23:08 < sulix> (Code is in git) +--- Day changed Thu Aug 21 2014 +12:57 < sulix> So it turns out that quadtrees are hard, and reparametrising béziers is why. +13:03 < matches> I don't seem to see anything anymore with the quad tree enabled +13:10 < sulix> The quadtree doesn't let you add things in realtime. +13:10 < sulix> Quadtree nodes are immutable once created. +13:12 < matches> Ah +13:35 < sulix> debug: ReParametrise (bezier.h:190) - (0.000000,0.000000),(1.000000,1.000000),(1.000000,1.000000),(1.000000,1.000000) -> (-nan,-nan),(-nan,-nan),(-nan,-nan),(-nan,-nan) +13:36 < sulix> Looking good! +13:54 < sulix> Clearly, the quadtree rendering is now perfect: http://davidgow.net/stuff/ipdf-this-is-definitely-a-fox.png +--- Day changed Sun Aug 24 2014 +17:51 < matches> ... +17:51 < matches> I am parsing CSS in the SVGs +17:51 < matches> WHAT HAVE I DONE +17:52 < matches> Blame inkscape for always using css to control the properties +17:57 < matches> http://szmoore.net/ipdf/death-by-shading.png +17:59 < matches> Anyway there is a proper "Group" data type like with the Beziers +18:00 < matches> So if you want to cache things related to groups you can put them in that I guess +18:02 < matches> Really it should be called "PATH" not "GROUP" but I vaguely thought it might be able to be used as either +--- Day changed Mon Aug 25 2014 +10:39 < matches> I was thinking about how to do shading more +10:40 < matches> And I basically arrived at the idea Loop and Blinn have that you kept talking about +10:40 < matches> Except I didn't realise it at first because my version was all using rectangles instead of triangles +10:40 < matches> I think I will try to get my scanline fill to work first though +13:03 < matches> It sort of works +13:15 < matches> ... or not +--- Day changed Tue Aug 26 2014 +14:25 < matches> I wonder if I'm going to end up just reverse engineering an algorithm that I was too lazy to understand properly +14:26 < matches> I really like the idea of flood fill better than doing insane triangulation maths +14:26 < matches> Surely GPUs can flood fill +14:28 < sulix> I think they can, but either very slowly or only on very new hardware... +14:28 < sulix> I think you'd need to do it in several passes, maybe? +14:28 < matches> The problem I had with flood fill was working out where to start +14:28 < matches> I have something that almost works +14:28 < matches> That requires no clever maths... +14:29 < matches> But it is CPU only +14:29 < matches> And probably breaks in a bunch of special cases +14:30 < matches> It doesn't have precision problems though (once you've drawn the boundary that is) +14:31 < matches> It would still be cool to go through the Loop/Blinn algorithm on CPU and GPU +14:31 < matches> Because that is going to have floating point maths in it +14:31 < matches> flood fill has no floats +14:31 < matches> Therefore it is infinite precision +14:31 < matches> Objective complete +14:32 < matches> Actually I don't think my algorithm is proper flood fill, it's sort of scanline flood fill but not? +14:32 < matches> When in doubt write random code +14:34 < sulix> How are you handling the case where, due to a path being half offscreen it becomes two paths? +14:34 < matches> ... I am not +14:35 < matches> If part of the path is offscreen it is annoying +14:36 < sulix> Hopefully, once some of the quadtree code is more functional, the path clipping code can be used to clip paths to the screen. +14:39 < matches> Compositing is also totally broken because the fill just looks for black pixels +14:40 < matches> But if I can get it doing fonts then that's sort of not totally useless +18:35 < matches> I am very tempted to implement a "Please click on the location to fill this path from" interface at the moment +18:39 < matches> Alright, I have shading somewhat stack overflowing +18:39 < matches> I mean +18:39 < matches> Working +18:39 < matches> * +18:39 < matches> ******** +18:49 < matches> http://szmoore.net/ipdf/shading-the-only-svg-that-doesnt-segfault.png +20:43 < matches> Argh +20:43 * matches stabs coordinate transforms +20:43 < matches> stab stab stab +20:44 < matches> My filling algorithm is to find the 4 extrema of the path +20:44 < matches> And try and flood fill inwards from each one +20:45 < matches> But the extrema pixel coordinates keep transforming to *outside* of the path +20:45 < matches> By one pixel +20:45 * matches stabs +21:52 < matches> I guess I should just actually implement loop and blinn shading +21:52 < matches> Flood fill is not as easy as I had hoped +21:53 < matches> I have to start doing annoying geometry maths to work out what point I can start the flood fill at +21:55 < matches> Sigh +--- Day changed Wed Aug 27 2014 +22:33 < sulix> Suddenly: ToAbsolute on ToRelative does not give original Bezier +22:34 < sulix> I may need to rethink what my quadtree code is doing to those poor curves. +22:51 < sulix> Never mind, that assertion happens _whenever_ trying to load cubicbeziers.svg. +23:03 < sulix> Oh wow: you should see what happens if you start splitting and reparametrising beziers with bad precision. +23:03 < sulix> 'tis "whacked" +23:08 < sulix> http://davidgow.net/stuff/ipdf-a-slight-curve.png +23:15 < sulix> And the Quadtree infinite precision for béziers now works* +23:15 < sulix> *for some beziers. +23:15 < sulix> * for some large finite value of "infinite"