Posts

Greedy meshing in javascript

Image
 I've been working on an extension of the Voxel mesh in three JS that I built in this blog post and I'm thinking of developing it into an upcoming game at ManicVoxels.com To be able to expand the reach of the game to lower-power devices I needed to make the program more efficiently rendered. This would allow the players on the lower-powered devices to still have a reasonably sized world around them. When looking at the Greedy meshing tutorial from 0fps I really struggled to work out what the algorithm was. I then realised what is actually going on; you start in the top left, you go as far right as you can and then you go as far down as you can. You then repeat this until you have a new mesh. Once I'd worked out what greedy meshing was doing I could start to code it up. I've also added an animation of the algorithm below. In the animation, you can see the cursor moving from the top left to the bottom right. As if goes if the square is to be included in a new mesh then

Coding on the beach

Image
  I have for a long time wanted to make a system that would allow me to code on a beach. In recent years I’ve had two approaches to this, one has been to try and produce some sort of virtual reality desert island with a beautiful break . The other has been to try and produce a screen that I can see in direct sunshine. But modern screens are far better at being seen in the sunshine you might say. Just get an anti-reflective coating you might say. Both of these are good solutions but as you can see from the picture below both pale in comparison with my creation. The screen I present here is the culmination of 5 attempts and over £100. The device has 80w of led draw producing a lighting power for which a back panel full of heat sinks cannot dissipate in high ambient temperatures.   So far I haven’t been able to test the device outside of my flat and I know from previous experiments that ended up in the prototypes being smashed that the power pack I have cannot support both the screen and

A world of joins

Image
 I often get confused with joins so I looked over the many cheat sheets on google images. The problem I have with the classic cheat sheets is that they all display the joins in terms of Venn diagrams and I've never really understood if the Venn diagram represented the columns or something to do with the data. I've been working to move some code from R in which joins are heavily used to python where pandas has some join functionality but not everything I wanted. To bring across that join functionality I had to understand the nature of the joins at a depth that I just never had before. The following image is what I came up with.

Programming by example

Sometimes I don’t know the function I need to perform a task I want. Often its something simple like; I have two dataframes and I want to create a new dataframe which has all the rows of the first followed by all of the rows of the second. I can for a small example create the two data frames and I can try and describe what I want to find through google, however, often the phrases that I type into google, being natural language, are ambiguous an imprecise of what I’m trying to describe. In this example of concatenating data frames, I more often came across joining the two dataframe by adding the columns of one to columns of the other rather than adding rows. This test of the function I’m currently building passes managing to find the function in the pandas library which concatenates the two objects. This is still very much a pre-useful stage as in the test I’ve had to put the two dataframes in a list as, having found the solution through google

Trying to make a computer

  As mentioned in a previous post I built my own computer about a year ago. One of the issues I have had with using it is constantly being undecided on what OS I should use for it. While my preference would be Ubuntu all the way I have since getting my oculus quest 2 wanted to be able to make use of the graphics capabilities for VR. Unfortunately, to do this I need to be running windows, which for all other tasks I would loth to use. My first thought was virtualisation. Virtualisation is the process of running a second OS on top of a first as if the second os was just a program like any other. This often comes with a lot of complications that simply running any other program doesn't. A lot of those issues come from the fact that what the os outside of the pretty things the use sees is a lot of management of the hardware and of the drivers between the hardware and the software running on the os. Modern operating systems do a lot of work to make sure that software can't access h

The depressing reality of the progression of VR

I once had to write a blog post about VR in my first year of  In my first year of university, I had to write a blog post about VR. If memory serves me correctly it only had to be 250 words, however, as a dyslexic who had chosen CS in part as a degree with few written tasks, I found writing the post challenging. No one is instructing me to write this post and it will be longer than 250 words. Pushing through dyslexia and all that. When I wrote that first post I was arguing why VR might be around to stay this time. I can't remember how I argued the point and I no longer have a copy of the post. What I want to argue here is that not only is VR here to stay but its progression will allow for a society that we will both choose and to us now seems so dystopian it could only be in sci-fi. The basis of my premise is that people would love to go play tennis with their friends but play Wii fit instead. Why is this? Consoles are not cheap, although that is always a relative term. In today'

Legal fairness in disputes with vastly different sized war chests

  I think it's best if I first clarify what I am proposing, what I think it might solve, and then how I feel the problems you raise may be voided. First, the problem I see which this idea would seek to solve is the problem that large differences in spending on sides of a case will inevitably lead to differences in the quality of the evidence and research that can be done on either side leading to the law not being fair. I believe wholeheartedly and very strongly that the law should be fair and everyone equal under it. The premise upon which my plan provides a fairness I feel from what I have heard is currently missing from the legal profession, is that it is far cheaper to find the truth than produce a lie. This is based on examples I imagine such as to report a document is cheap while generating a fraudulent one which is statistically consistent is expensive. The premise is that: “To build a convincing lie is expensive.” Based on this premise I postulate that if both sides have eq

Popular posts from this blog

Some thoughts on solving transcendental equations

A failed attempt at yielding rivers from gradient noise