Posts

Fossicking

Image
 I've recently been on holiday in NSW, and my uncle gave me a pile of sapphire bearing gravel which he'd added gold to. I had lot of fun sifting through it and I'd love to go back and collect more of the stuff. I got the impression that the minerals in the gravel would glow under UV light, so I bought a UV flood light and some electronics to make a UV strobe. I could use the strobe to tell me if I'm digging in the right place. Only 1% of the bits of gravel glowed under the spotlight so that was a bust. I'm also thinking of looking for gold. I've been thinking a lot about how I could make my own metal detector. I purchased a solder-your-own metal detector kit, MDS-60, and it's not great. I could detect a 5c coin from around 5mm. It's a start, but I'd like to build a metal detector that can compete on sensitivity to small pieces of gold as an expensive unit. Here is a video of the device in action  With a bit of fine tuning I was able to achieve detect...

Maths Game.

Image
 I am (occasionally) working on an action RPG game where every time you attack you have to answer a maths question. RPGs are cool and I used to play them a lot but now I am a social gamer and I don't appreciate the brain-drain. I have accrued a large repository of spaghetti code with a few gems as I learn the ins and outs of game programming in C ( https://github.com/BostonBrooks/Spaghetti_Graveyard. ) . I chose C because it is what the electronic and computer engineers use and working as an ECE is a long term goal for me. I am using the C binding for SFML because SDL doesn't easily incorporate 2D meshes, to be used for 2.5D curved ground surfaces. A few demos below. Scritchyness is due to screen capture software.     All for now, Boston.   Update 17/02/2022 In the game, the terrain is represented as a 2 dimensional grid where each point has a third dimension (height). I have used bicubic interpolation (functions with x^3 and y^3 terms) to smooth the areas between po...

Deep C.

In this thread I will post interesting features and usages (of mostly the C programming language), that might not be known to a novice programmer. I might figure out how to display code nicely, at some other time.  typedef (declare) a struct name before defining said struct: typedef struct myStruct myStruct; struct myStruct {      myStruct* next      ... };  You can also typedef (declare) a pointer to a struct without defining the struct to achieve type safety (the pointer cannot point to a struct with a different type), and encapsulation (because it doesn't have access to the definition of said struct). Constant on the left!   if(NULL == x){...} is better than if(x == NULL){...} because then you don't get if(x = NULL){...} by mistake Declare type once: struct T *p; p = malloc(sizeof *p); instead of: struct T *p; p = malloc(sizeof (struct T)); Similarly sizeof array = (sizeof (ary) / sizeof (ary[0])) Sin...

Original Art

Image
 Here is where I will post artwork that is 100% my own intellectual property: I've always been fascinated with things that glow in the dark, such as Christmas tree lights. In the past I've painted a starry night like this. Below are some designs I've made with glowing butterflies. Mr fox is an interesting character from my past. I still use this kind of art style for characters in the game I'm making.   All for now, Boston Update 20 / 6 / 2022 Here are some things I made at pottery with mum: Broken Mushroom: Update 05/07/2022: I made a mould of my clay tortoise and made a plaster copy: Update 08/05/2022: I carved out the bottom mould so that the head will stop getting stuck in there and breaking off. Now I don't have enough liquid silicone to make a new top mould... Update 27/03/2024 It's been a long time since I posted an update. Here are some photos of my experiment with using a vacuum chamber to suck the air out of a mold and then have that space being rep...