It sounds like such a similar algorithm to the chaos method of drawing a sierpinski triangle, and yet that gives straight, precise, clinical results, whereas this approach looks almost organic.
Yes - once you get wide triangles with the outer edges as their bases, they are so short that cutting them in half leaves the new centre not far from where you cut.
@MartinBüttner since they are both such round numbers I'm going to assume that the Wikipedia article I quoted from had a typo rather than being horribly out of date...
I do hope no one has to explain them all in an exam question...
@COTO DOM manipulation is enough to do eval. Getting restricted-source restrictions right is so hard that I'm not sure there are any questions yet which manage it.
I've added the circumcentre... for regular triangles like equilateral of 45 degree isosceles, you just get something which looks like a diffraction pattern on a square/hex grid... but for irregular triangles it gets weird
Eric suggested a challenge where you recursively plot triangle centres by one of the 5000 triangle centre definitions... and I didn't want to wait for the challenge to see what the resulting fractals look like...
try redefining the circumcenter of a degenerate triangle to be the middle of the line segment, or the middle of the three points, or the average of the middles of the three line segments?
that would just turn degenerate triangles into solid lines of dots, I guess :/
@MartinBüttner have you considered doing non-triangular shapes? inscribed and circumscribed circles are a thing for every shape, and easy to calculate for convex shapes, very easy for regular shapes.
and if you can support non-triangular regions, then instead of splitting a region based on just its vertices and center, you could do a voronoi diagram based on the vertices and center, intersected with the original shape.
@PeterTaylor I discussed it a little with@MartinBüttner and as I don't know how to make the data creation language agnostic we agreed I could create a script that outputted it to standard out
You don't have to implement an identical test set to the current one, surely? The important thing is that everyone tests on the same data, not precisely what that data is.
But if you don't like that idea, another one is to stuff the generation code away in a footnote and to provide pastebin links to its output.
Some background
Counting rods are small bars (3-14 cm long) that were used by mathematicians from many asian cultures for more than 2000 years to represent any whole number or fraction. There was also a written version, called rod numerals.
Here's how it works:
(If at any point you get confuse...
@overactor I reckoned it would take about half an hour to really understand the question, and I didn't think it looked interesting enough to be worth that kind of investment up front.
I also wanted to explore the 2.5D possibilities a bit more than Trine does. e.g. by having T junctions where the plane you walk in switches. or where the plane you move in is bent into a cylinder (climbing a tower)
well, our institute had a UI group, and they had equipment for that. some friends of ours were doing their final-year project with that professor. we helped them out writing some machine learning script and got to use the mo-cap equipment for a day in return ^^
I'm still stumped that I have a really hard time thinking of more than 9 languages to do the averages in. I think I need to start looking into more. (I even have a list of languages to check out, but for some reason it never gets shorter.) maybe it's time I learned one of those golfing languages?
but how do I decide between GolfScript, CJam, J and APL?
@MartinBüttner, GS and CJam are roughly speaking golfed versions of a modern scripting language like Ruby. J and APL are more specialised in that they're designed for maths, and they have some nifty parallelisation features. The main difference between them seems from the outside to be the character set.
This reminds that I also haven't used any truly functional language since some "Introduction to Programming Concepts" course 6 years ago
maybe Haskell, Lisp or Scheme would be interesting to learn as well
(@PeterTaylor going by that description, I'd probably pick J first... looking into different paradigms is probably a better learning experience than just looking into golfed versions of concepts I already know)
I should really make "One language a month" a thing
especially now that I know PPCG, it's really not too hard to find enough ways to practice a new language
I think it's something along the lines of "State and describe 2 to 3 algorithms (of some sort I can't work out) and a machine"... I really don't what the last piece is
I've got a German friend whom I've passed it to, so I'll get back to you
Introduction
Hello, for my third competition, I'm doing a popularity contest! This means that the person with the most votes wins. After taking inspiration from April Fools (A bit late, I do realize!), I felt that there just weren't enough for command prompt.
Task
To create a program that w...
Unbelievable. I just found this code buried in a function that I am 99% sure can't be hit unless the planets align just right.
temp.Add("popTartWithNoIcing");
temp.Add("Look@me");
temp.Add("til~deMorninComes");
Written by the same guy who writes every other quirky piece of code I come across
The only programmer whose code I enjoy finding no longer works here. Is that a sign?
@overactor To be precise, only when your name includes %40, %7E, and you somehow fall through this giant switch statement because your type is something unexpected.
I managed to piece together than %40 is HTML for @, and %7E is HTML for ~. But wtf does poptartwithnoicing mean?
Nah, they just decided to get on the "healthy" kick along with everyone else. Not that a lack of frosting will convince anyone that they're healthy, but appearances rule marketing.
@MartinBüttner yay! Maybe people's opinions will change now that there is only one sandbox - maybe I should edit so people's old votes are no longer locked in