code logs -> 2024 -> Fri, 11 Oct 2024< code.20241010.log - code.20241012.log >
--- Log opened Fri Oct 11 00:00:10 2024
02:35 Degi_ [Degi@Nightstar-ii9sed.pool.telefonica.de] has joined #code
02:36 Degi [Degi@Nightstar-nuhksd.pool.telefonica.de] has quit [Ping timeout: 121 seconds]
02:36 Degi_ is now known as Degi
03:24 Lamb3 [Dawg@Nightstar-0buihq.pbiaas.com] has joined #code
04:11 Vornicus [Vorn@Nightstar-8k6f0b.res.spectrum.com] has quit [Connection closed]
08:19 PinkAFK [Pink@Nightstar-an5kp7.sub-75-222-0.myvzw.com] has quit [Connection closed]
08:19 PinkAFK [Pink@Nightstar-an5kp7.sub-75-222-0.myvzw.com] has joined #code
08:47 himi [sjjf@Nightstar-o4k.pal.170.103.IP] has quit [Connection closed]
08:53 himi [sjjf@Nightstar-o4k.pal.170.103.IP] has joined #code
08:53 mode/#code [+o himi] by ChanServ
09:10 PinkAFK [Pink@Nightstar-an5kp7.sub-75-222-0.myvzw.com] has quit [Connection closed]
09:11 PinkAFK [Pink@Nightstar-an5kp7.sub-75-222-0.myvzw.com] has joined #code
10:30 Alek [Alek@Nightstar-06ca3p.il.comcast.net] has quit [[NS] Quit: ]
12:24 Alek [Alek@Nightstar-06ca3p.il.comcast.net] has joined #code
14:35 Vornicus [Vorn@Nightstar-8k6f0b.res.spectrum.com] has joined #code
14:35 mode/#code [+qo Vornicus Vornicus] by ChanServ
15:42 Kimo|autojoin [Kindamoody@Nightstar-qg5daj.tbcn.telia.com] has joined #code
15:42 mode/#code [+o Kimo|autojoin] by ChanServ
16:42 Vornicus [Vorn@Nightstar-8k6f0b.res.spectrum.com] has quit [Connection closed]
17:20 Alek [Alek@Nightstar-06ca3p.il.comcast.net] has quit [Ping timeout: 121 seconds]
17:21 Alek [Alek@Nightstar-06ca3p.il.comcast.net] has joined #code
17:54 Kimo|autojoin [Kindamoody@Nightstar-qg5daj.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
17:57 ErikMesoy [Bruker@Nightstar-eh8.6r7.232.178.IP] has quit [Connection closed]
18:05 ErikMesoy [Bruker@Nightstar-eh8.6r7.232.178.IP] has joined #code
18:05 mode/#code [+o ErikMesoy] by ChanServ
18:38 Emmy [Emmy@Nightstar-qo29c7.fixed.kpn.net] has joined #code
18:43 Kimo|autojoin [Kindamoody@Nightstar-qg5daj.tbcn.telia.com] has joined #code
18:43 mode/#code [+o Kimo|autojoin] by ChanServ
21:27 Vornicus [Vorn@Nightstar-8k6f0b.res.spectrum.com] has joined #code
21:27 mode/#code [+qo Vornicus Vornicus] by ChanServ
21:31 Kimo|autojoin [Kindamoody@Nightstar-qg5daj.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
22:26
< sshine>
I recently started playing around the web-sys crate for Rust, drawing hexagons on HTML Canvases.
22:27
< sshine>
I implemented Turtle graphics because I teach Java and had fun with that, drawing the NixOS logo, and wanting to make more use of hexagon tiling.
22:27
< sshine>
I ultimately want to animate the drawing, since it's just DOM interaction, but I'm not quite done modelling the playing field.
22:28
< sshine>
then it occurred to me that I'm pretty close to being able to do aperiodic tilings, for excample this one: https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Smith_aperiodic_monotiling.svg/2560px-Smith_aperiodic_monotiling.svg.png
22:29
< sshine>
before doing this with Turtle graphics, I felt that the trigonometry wasn't very fun.
22:29
< sshine>
but with Turtle graphics, I can think imperatively about it, and so it's a lot more fun with trial-and-error, composing sub-patterns and so on, not really thinking about what the overall equation is.
22:31
< sshine>
but one thing that bugs me is the rounding errors; I'm currently working with f64, and I get around the lack of precision by never calculating back to the same point; e.g. I write hexagons within one another, and when I need to pick up the needle and put it down somewhere I've been before, I simply use that point from memory.
22:32
< sshine>
since they're SVGs, I assume I could do animations that involve arbitrary zoom, and the rounding errors might become a problem.
22:32
< sshine>
I have two solution strategies and I want to know what you guys think:
22:33 Kimo|autojoin [Kindamoody@Nightstar-qg5daj.tbcn.telia.com] has joined #code
22:33 mode/#code [+o Kimo|autojoin] by ChanServ
22:33
< sshine>
1) instead of f64, use arbitrary precision ratios, and only convert to floats when rendering.
22:34
< sshine>
2) cache every point and perform some kind of "snap to grid" lookup, so if an existing point is close enough, assume precisely that point.
23:24 Emmy [Emmy@Nightstar-qo29c7.fixed.kpn.net] has quit [Ping timeout: 121 seconds]
--- Log closed Sat Oct 12 00:00:11 2024
code logs -> 2024 -> Fri, 11 Oct 2024< code.20241010.log - code.20241012.log >

[ Latest log file ]