Click here to Skip to main content
14,242,971 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life. Technical discussions are encouraged, but click here to ask your programming questions.

The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct, no programming questions and please don't post ads.
 
GeneralWSO CCC OTD 2019-04-22 Pin
OriginalGriff21-Apr-19 21:50
protectorOriginalGriff21-Apr-19 21:50 
GeneralRe: WSO CCC OTD 2019-04-22 Pin
pkfox21-Apr-19 23:29
professionalpkfox21-Apr-19 23:29 
GeneralRe: WSO CCC OTD 2019-04-22 Pin
OriginalGriff21-Apr-19 23:41
protectorOriginalGriff21-Apr-19 23:41 
GeneralRe: WSO CCC OTD 2019-04-22 Pin
pkfox22-Apr-19 1:03
professionalpkfox22-Apr-19 1:03 
GeneralRe: WSO CCC OTD 2019-04-22 Pin
OriginalGriff22-Apr-19 1:14
protectorOriginalGriff22-Apr-19 1:14 
GeneralRe: WSO CCC OTD 2019-04-22 Pin
GKP199222-Apr-19 2:00
professionalGKP199222-Apr-19 2:00 
GeneralRe: WSO CCC OTD 2019-04-22 Pin
OriginalGriff22-Apr-19 2:14
protectorOriginalGriff22-Apr-19 2:14 
GeneralThe plight of the doomed programmer... Pin
Super Lloyd21-Apr-19 21:10
memberSuper Lloyd21-Apr-19 21:10 
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.. Cry | :((

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... Cry | :(( Cry | :((

I don't want to give up.. but I have doubts.. Frown | :(

An idea just hit me... OMG | :OMG:
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: OMG | :OMG:
(data was collected from a user friendly test app)
[Fact]
public void ToughCut()
{
    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);
    Assert.Single(result.Shapes);
}
A new .NET Serializer
All in one Menu-Ribbon Bar
Taking over the world since 1371!

GeneralRe: The plight of the doomed programmer... Pin
RickZeeland21-Apr-19 21:18
mveRickZeeland21-Apr-19 21:18 
GeneralRe: The plight of the doomed programmer... Pin
Super Lloyd21-Apr-19 21:59
memberSuper Lloyd21-Apr-19 21:59 
GeneralRe: The plight of the doomed programmer... Pin
OriginalGriff21-Apr-19 22:38
protectorOriginalGriff21-Apr-19 22:38 
GeneralRe: The plight of the doomed programmer... Pin
Super Lloyd22-Apr-19 0:04
memberSuper Lloyd22-Apr-19 0:04 
GeneralRe: The plight of the doomed programmer... Pin
Super Lloyd22-Apr-19 0:10
memberSuper Lloyd22-Apr-19 0:10 
GeneralRe: The plight of the doomed programmer... Pin
RickZeeland22-Apr-19 1:45
mveRickZeeland22-Apr-19 1:45 
GeneralRe: The plight of the doomed programmer... Pin
enhzflep22-Apr-19 22:07
memberenhzflep22-Apr-19 22:07 
GeneralRe: The plight of the doomed programmer... Pin
GuyThiebaut22-Apr-19 0:54
professionalGuyThiebaut22-Apr-19 0:54 
GeneralRe: The plight of the doomed programmer... Pin
Daniel Pfeffer22-Apr-19 2:00
professionalDaniel Pfeffer22-Apr-19 2:00 
GeneralRe: The plight of the doomed programmer... Pin
Super Lloyd22-Apr-19 3:18
memberSuper Lloyd22-Apr-19 3:18 
GeneralRe: The plight of the doomed programmer... Pin
rnbergren22-Apr-19 2:32
memberrnbergren22-Apr-19 2:32 
GeneralRe: The plight of the doomed programmer... Pin
RJOberg22-Apr-19 3:20
professionalRJOberg22-Apr-19 3:20 
GeneralRe: The plight of the doomed programmer... Pin
Daniel Pfeffer22-Apr-19 1:00
professionalDaniel Pfeffer22-Apr-19 1:00 
GeneralRe: The plight of the doomed programmer... Pin
Super Lloyd22-Apr-19 13:38
memberSuper Lloyd22-Apr-19 13:38 
GeneralRe: The plight of the doomed programmer... Pin
Member 1023899823-Apr-19 5:08
memberMember 1023899823-Apr-19 5:08 
GeneralRe: The plight of the doomed programmer... Pin
Member 1023899823-Apr-19 5:08
memberMember 1023899823-Apr-19 5:08 
GeneralRe: The plight of the doomed programmer... Pin
maze324-Apr-19 5:11
professionalmaze324-Apr-19 5:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.