Chasing Rainbows

I had another go at rainbows this morning.

Screenshot 2016-06-11 11.19.40

The more I code a simple virtual universe the more I appreciate how amazing the real one is. When we try to create beautiful things we experience something of the delight God had in his creation. All our attempts are pale imitations of those first expressive acts when God spoke things into being. How gloriously amazing to come up with the idea of clouds and the way they light interacts with them; to create the laws behind quantum physics and fluid dynamics so that we see rainbows.

Beauty means something. It’s not just an experience. When God’s brush arched the first rainbow in the sky he was expressing something to us: the beautiful glory of his steadfast mercy and grace. World wide judgement would be held back and grace will rain down.

There is another judgement, a final one of fire, but before that God would open the floodgates of his mercy in giving us his son. The stars declare the glory of God and the sky his handy work but the cross put them all in the shade.

The rainbow points to and encircles (Rev 4:3) the glorious God who is both just and gracious. Beauty means something, and the experience of it and the act of creating should lead us into worship.


PS. That’s a crystal house you can see on the left. I think there will be a lot of gem stone architecture in heaven!

PPS.As I walked downstairs after posting this blog entry, guess what someone handed me:


They found it behind an old cabinet as they were cleaning out a room. Coincidence?


Share the joy

I’ve not blogged much recently because I’m doing some programming. I have just uploaded a few videos of my mini universe to YouTube and pondered why I would do such a thing. It’s not that I think it is all that good – just compare to early versions of No Man’s Sky  and the amateur nature of my project becomes immediately apparent, embarrassing even. I think itpic1’s more that when you really enjoy doing something you want to share the experience. You want to shout out “hey I love doing this, this is great fun. I want you to enjoy it too”. Even if other people look at you in a slightly bemused way.

I keep wanting to mention my programming in my preaching but I’m trying not to as it’s not a very good source of illustration for most people. I keep thinking how this aspect of programming or that facet of procedural computer graphics is such a good analogy to some aspect of the gospel or what the bible says about something but Jesus used more everyday things that everyone could relate to. Not HLSL or C++. A love of football would be so much more helpful in communicating (and I did try recently when speaking on Hebrews 6) but hey, God gave me a love of vector mathematics and pretty pixels.

I guess it’s why people like telling others about Jesus. He is the best thing anyone would ever have and so it’s natural to share your joy in him with others. Forgiveness, love, eternal life, meaning, purpose, beauty, grace…The list goes on. And Jesus himself is even better than all these benefits.

God loves to share his joy too. He delights in himself, and wants to draw us into that. It’s basically a key aspect of his glory (I want to say the aspect but I haven’t got time to think about it to make sure right now…) – God revealing his inner joy and delight in his own excellence and perfection (there is a wonderful dynamic of glory between the Father, Son and Spirit) . And before we think how self-centred that is, consider for a moment that his glory is most wonderfully and clearly expressed in the cross of Jesus where he gave himself up for us. The most un-self-centred act in all history intended to make a way for us to share in the joy he has in is own self-sacrificing, unconditionally loving, burningly holy, just (infinite recursion on every good adjectival concept) excellence.

Enjoy the videos, but don’t miss out on Jesus!












Would God use bubble sort

I have been doing a bit of programming again recently. I was building and rendering a universe, and so had occasion to sort a set of planets in order of furthest away last. I only had a few planets in each sector, although there are an almost infinite number of sectors.

If I was going for maximum efficiency and style of coding I would notuse bubble sort as it is not the most efficient for longer lists of things, but for my purposes the speed saving just didnot warrant me going to the extra effort to remember and implement a more elegant and efficient sorting algorithm.

I have always liked bubble sort because it is simple. You just go through the list of things swapping one element with its neighbour, if needed, until you no longer need to swap anything. It’s just a few lines of code. Simple. Easy to debug too. Other algorithms sort stuff in the order of “n log n” rather than n squared, although I can’t remember their names.  pic3

Anyway, my question is would God use bubble sort? Does everything he does have to have maximum elegance and efficiency or are variety, simplicity, and “good enough”, valid, God like design principles.

My universe looks rubbish compared to the real one but its keeping me amused in my free time. I started it over a decade ago but was recently inspired to dust of the code after seeing the “No Mans’s Sky” videos. A year is a long time to wait for it to come out so I thought I’d have a go at a poor man’s version in the mean time. I have always loved procedural modelling. I got into it as an undergrad and developed it as a post grad to render fire and explosions. I remember readip21ng the SIGRAPH paper on the Perlin noise function for the first time. Special moment! Although saying that I have not used it yet in my universe. I have found some other simple/hacky methods to texture a sphere.

BTW, There are a lot of rings in the pics because I have just added them to the code. Very pretty I think. Kind of give the impression of rainbows form the planet surface.




Here is a quick flight around a small area of my universe so far. You can’t see the stars as they were obviously too small for the video capture. I love the fact you can fly to any of them. Always wanted to do that. Not too tricky to implement now with a good graphics card. Woosh – To infinity and beyond!