The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
Those things contain some of the best magnets you'll ever get.
Worth opening a few to get them if you don't have any. Some have one, some have two.
To give you an idea of their strength, you can magnetize a screw driver enough to hold screws with a single 'swipe'. Solidly affix things to car trunk (if it's steel and not plastic) without having to do any damage to the vehicle; refrigerator magnets that don't drop anything - every; on a string or stick, use to recover dropped things - even find them when you can't see them as it will pull small things (like pins on the floor) a good distance. Also, two of them snapping together could take a piece of meat out of you if you're not careful.
I got that cool app idea... It wouldn't have many customer, but it would have some and, to really shine, I just needed to solve one tiny (ahem) mathematical problems... Plus it would be like my.. mmm.. legacy? you know something, forgot the word, that shows your art and pride!
3 years and many frustration later (to be fair I spent more time playing video game than looking at it, since it's trauma inducing frustration) it isn't complete..
At this stage the code looks almost simple and elegant (some method implementation are still scary though, some of them are 300 lines!) but it finally stumbled on what I guess looks strongly like... unavoidable mathematical rounding error...
It all starts with Bezier-Bezier curve intersection is an inexact science...
And it shows in unexpected place (or maybe dreadly expected hey?) when one does potato-potato intersections...
I don't want to give up.. but I have doubts..
An idea just hit me...
What if I made an article "a potato-potato intersection algorithm that almost work", would that attract the attention of challenge seeking programmer?
I would have to share sh*t ton of (undocumented) visualization code though (I dunno how much of my utility library I need to make it work, but just the low level visual classes are 100KB and 12 files)
And it's also part of what make my (unfinished) app looks great... Mmmm...
Or I could share the unit test code... but it's dreadfull and not conducive to creativity, it looks like that:
(data was collected from a user friendly test app)
var cutter = new Ring(new Element(new Point(130.783333333333, 199.310477598184)), new Element(new Point(127.38497431913, 199.310477598184), new Point(124.073849393798, 198.234627893256), new Point(121.32451919832, 196.237122582712)), new Element(new Point(118.575189002842, 194.239617272168), new Point(116.528801257989, 191.423006177879), new Point(115.478650569613, 188.190974692711)), new Element(new Point(114.428499881237, 184.958943207542), new Point(114.428499881237, 181.477420428821), new Point(115.478650569613, 178.245388943653)), new Element(new Point(116.528801257989, 175.013357458484), new Point(118.575189002842, 172.196746364196), new Point(121.32451919832, 170.199241053652)), new Element(new Point(124.073849393798, 168.201735743108), new Point(127.38497431913, 167.12588603818), new Point(130.783333333333, 167.12588603818)), new Element(new Point(131.219696969697, 167.12588603818)), new Element(new Point(134.6180559839, 167.12588603818), new Point(137.929180909233, 168.201735743108), new Point(140.678511104711, 170.199241053652)), new Element(new Point(143.427841300188, 172.196746364196), new Point(145.474229045041, 175.013357458484), new Point(146.524379733417, 178.245388943653)), new Element(new Point(147.574530421793, 181.477420428821), new Point(147.574530421793, 184.958943207542), new Point(146.524379733417, 188.190974692711)), new Element(new Point(145.474229045041, 191.423006177879), new Point(143.427841300188, 194.239617272168), new Point(140.678511104711, 196.237122582712)), new Element(new Point(137.929180909233, 198.234627893256), new Point(134.6180559839, 199.310477598184), new Point(131.219696969697, 199.310477598184)));
var shape = new Shape(new Ring(new Element(new Point(12.7754813116188, -33.4128419451628), new Point(19.5223174580931, -29.9751572249652)), new Element(new Point(179.975157224965, 130.477682541907), new Point(183.412841945163, 137.224518688381)), new Element(new Point(185.725341896497, 151.825068758803), new Point(184.540796469908, 159.303994240127)), new Element(new Point(177.829660223277, 172.475340741641), new Point(172.475340741641, 177.829660223277)), new Element(new Point(159.303994240127, 184.540796469908), new Point(151.825068758803, 185.725341896497)), new Element(new Point(147.413657866616, 184.927395588484)), new Element(new Point(146.852379570287, 182.353400030402)), new Element(new Point(146.522877591701, 179.583755006682)), new Element(new Point(145.383023854803, 176.075645925844), new Point(144.229050444769, 174.093123340167)), new Element(new Point(141.746213714654, 171.399140511575)), new Element(new Point(139.217451805972, 169.454756076673), new Point(138.114716791943, 168.838299011114)), new Element(new Point(136.430867679513, 168.027334481522)), new Element(new Point(133.339495787831, 167.287179375534)), new Element(new Point(131.869596806395, 167.12588603818)), new Element(new Point(126.328777433712, 167.1807243084), new Point(125.140927792807, 167.390174249117)), new Element(new Point(120.57800049798, 170.108706697922)), new Element(new Point(-30.046677867818, 19.3819502930698), new Point(-33.4128419451628, 12.7754813116189)), new Element(new Point(-35.7253418964969, -1.82506875880269), new Point(-34.5407964699084, -9.30399424012683)), new Element(new Point(-27.8296602232773, -22.4753407416414), new Point(-22.4753407416414, -27.8296602232773)), new Element(new Point(-9.30399424012684, -34.5407964699084), new Point(-1.8250687588027, -35.7253418964969), new Point(5.47520627640808, -34.5690919208298))));
var result = shape.Cut(cutter, 0.1);
This is not really helping...
Even if I were to give up on my classes and uses Region, once I do am Xor or Intersects.. there is no way to get the resulting Drawing.. i.e. no way to further manipulating the resulting shape (after, say an Xor) by having handle on its vertices...
It's a bit like the RichTextBox a completely opaque and not really customizable much solution to a complicated problem...
From a purely psychological point of view I find it interesting that one of the qualities required to be a good programmer is the habit of obsessing over problems.
I find it interesting because the question is - at what point does that become unhealthy?
I mention this because I am learning python and as part of learning I am creating a bouncy ball program where a ball bounces off objects and its trajectory needs to conform with the effect of gravity.
I find the problem solving even finds its way into my dreams.
Anyway - I am not much help here, just an observation on the tendency we have to obsess over a problem until we solve it
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
Last Visit: 31-Dec-99 19:00 Last Update: 24-Feb-21 11:11