NetSpice, an online SPICE simulation tool...sort of

  • Posted on: 15 May 2014

I started working on a browser-based, netlist-based SPICE interface. Why? I'm not sure, it seemed like a cool thing to do; I'm aware that there's some good web-based, schematic-based implementations already out there.

To start, I downloaded and compiled the original Spice3f5 from Berkeley. ( I think I'm going to make a tutorial about this later on, it took some work). Then I began creating a simple "Ajax"-based web-interface. You can take it for a spin here:

NetSpice

Here is an example that was saved via permalinking; anybody can do this to any circuit in order to share it or pass it around:

NetSpice -- RC Circuit Example

Not Asteroids! (The HTML5 Game) Pre-Alpha Release

  • Posted on: 1 March 2014

Well, here is a very early (but semi-playable) version of the game I'm working on, Not Asteroids! Go ahead and give it a try.

If you're a fellow programmer, do yourself a favor, and don't look at the source. It's a total mess. I just wanted to get something out there because I find if I focus on maintaining the code as I write it, I'm less likely to actually finish anything (I'd like to clean it up at some point, though). Oh, and I'm also still not actually sure how to write javascript well.

Maybe I'll create another YouTube video later on, but for now, here are some screen shots:




HTML5 / Javascript Game / Game Engine Attempt

  • Posted on: 24 February 2014

I've decided it's time to take a shot at creating a video game.

I'm trying to write a cartoony Asteroid-clone using Javascript and HTML5. I chose HTML5 becuause I really enjoy the 'nativeness' of it, and it seems to be moving faster than Flash, although it still might not be the defacto favorite.

I'm trying to maintain some kind of architecture as far as what code belongs to the game engine, and what code is specific to this game. Why didn't I use one of the many availble game engines/frameworks? Good question.

Creating General Algorithm Templates in C++, A Tutorial

  • Posted on: 15 February 2014

Here is a brief, somewhat incomplete, tutorial on how to write some relatively general (read: re-usable) algorithms in C++. The example shown here requires an understanding of both overloading operators, and templates, so if you're a little rusty on those, take a look at these links:

Wikipedia article on template
A very long, but very good tutorial about C++ templates
Wikibook section about operator overloading in C++

Okay, you either skipped those links, or you've come back, with an understanding of templates and overloading operators in-hand.

Drawing the Mandelbrot Set With the HTML5 Canvas Element

  • Posted on: 2 February 2014

You've seen the Mandelbrot Set, even if you didn't know that's what you were looking at. Representing the set visually creates a pleasing fractal, but there's a good bit of mathematics just below the surface.

The idea is relatively simple. The 2-dimensional space shown in an image of the Mandelbrot set represents the complex plane. At each point on the complex plane, the following sequence is computed for each point c in the complex plane:

z(n+1) = z(n)*z(n) + c

If the sequence doesn't go to infinity, than that value c is part of the Mandelbrot Set. These values (values in the set) are traditionally colored black in an image of the set.

For values of c where the sequence diverges, a color can be used to represent how quickly the sequence diverges. In other words, if it takes 3 iterations of the sequence to to get to infinity, we see a different color than if it took 100 iterations.

2D Treecode in C++ -- Some Explanation and Programming Details

  • Posted on: 18 January 2014

The treecode algorithm is a way to solve problems that naturally have n^2 complexity in n log(n) time. When you think about it, it's really amazing. Go to Wolfram Alpha, and plot n*n and n*log(n) for n = 0 to some high value of n, and you'll see why complexity matters.

By the way, if you're not sure what n^2 complexity is, here's a quick example: Say you're trying to compute some interaction amongst a group of 10 particles. For particle 0, you have to sum the forces from particles 0-9 -- that's 10 operations. You have to do the same for the other 9 particles. At the end of the day, 100 operations must be performed. If you have 20 particles instead of 10, you must do 400 operations -- again with the complexity.

Pages