Coding Conundrums Evolved 4: Prime Wall Hangings
This post is part of a biweekly series of programming problems, targeted at those learning to program using C# at University. The problems will vary in difficulty - some will be rather easy, and some will be quite challenging! Don't worry if you can't solve a problem just yet - come back to it in a few months and it'll seem a lot easier than it did before.
Welcome to episode 4 of coding conundrums evolved. If you missed the last one, it is all about fiddly fuel and is located here. The password to the archive that contains my solution for it is iveinya
, but try solving it on your own first if you haven't already :-). This episode holds a bit of a different challenge for you.
The famous Professor Arkin, discoverer of illykin theory (the technology behind the quadrilateral engine first installed in the Lilai), has recently been recognised and awarded the prestigious Byema Or award. Along with this award comes a place for a statue in the hall of fame at Timiku University on the planet Eiriodin, the most distinguished and renowned University in the galaxy!
Since it's generally considered to be rather important to have an impressive statue (as you'd naturally expect!), Professor Arkin hired only the most skilled craftsmen to create his statue. After having the magnificent statue made and put in the hall, he thinks that there is still something missing.
Professor Arkin, upon hearing about your impressive skills from Chief Engineer Nebrilla, has asked you to write a program that generates a wall hanging to go behind his statue. In his specification for the wall hanging, he wrote this:
The exact nature of the wall hanging is up to you, but I am interested in something particularly impressive looking. The more impressive it looks, the more credits I will pay you for your trouble!
One of the key secrets to my illykin theory is actually prime numbers, so your design should feature them prominently.
(Author's Note: No actual funds will be paid upon completion of this challenge! Post about your creations in the comments and have a virtual cookie instead :D)
Write a program that generates a suitable wall hanging for Professor Arkin. Make sure that you feature prime numbers in your design!
Helpful Hints
- Plan your design on paper first so that you have something to work towards.
- There isn't any set solution for this problem (though I will certainly be providing mine in the next episode!).
- GDI+ is the native drawing library for C#. Make sure you include a reference to
System.Drawing.dll
if you decide to use it! - I've written a simple image generator template here: ImageGenerator.cs. If you have trouble getting started, feel free to use it as a starting point!
Here's what I managed to put together. I'm sure you can do better than I :-)
There isn't a challenge for this conundrum this time - though if you want one you could always try and animate your wall hanging (Professor Arkin is considering digital projector-based installations too). As usual the archive for my solution is here, and the password will be released in the next post.