Squiva's blog

Here, you can see what I am up to!

Benzene bob

bobenzeneOk, so there is a small error! Somewhere in the end, I put in an extra carbon. WOOPS!  The end product for the body should be a V not a Y. Like said, oops.


Code golf- ONE

Ok, heres a challenge for all of you coders. Make a Turing machine in any language you want. Heres a video that explains a turing machine pretty well: Watch this video carefully. This machine will work like Brainf**k. Each state will have an ASCII value. When you call the print function, the program will print the value on that square. This video will explain brainf**k in depth:  Best of luck!

Continue reading “Code golf- ONE”

OpenCV Java face detection

Hello! This is a simple tutorial on face detection iin Java. The first step will be to download OpenCV from their website. Their website can easily be accessed from google. First, we need to add a class called Mat2Image. This class simply sets up our video capture device. It can be downloaded here! First we make the class that sets up our video capture device. This, unlike the Mat2Image, creates the capture device, instead of creating the Matrix, or Mat. So, first, we type the following code:

static {

This loads the native libraries. Now, we load the Cascade classifiers. This loads the XML file that will tell opencv how to find points on someone’s face. To do this, we type:

CascadeClassifier face_cascade =new CascadeClassifier(“C:/Users/Squiva/Desktop/openCV/opencv/sources/data/haarcascades/haarcascade_frontalface_alt.xml”);

Now that we have loaded our Cascade classifier, we can instantiate the video capture device.

Continue reading “OpenCV Java face detection”

Advanced pursuit curve

This is an advanced pursuit curve. It pretty much is a tessalated shape. This means it spirals inward. This pursuit curve is a bunch of square pursuit curves right next to each other. Here is what it looks like…


Continue reading “Advanced pursuit curve”

Troxler’s effect

This is an optical illusion. All you have to do is look at the dot in the center. Because it’s an animation I cant show you a picture, but here is the source code…

import java.awt.Color;
import java.awt.Graphics;
import java.util.ArrayList;

import javax.swing.JFrame;
import javax.swing.JPanel;
public class Illusion extends JFrame{
public static void main(String args[]) {
new Illusion();

Continue reading “Troxler’s effect”

Basic pursuit curve

This is a basic pursuit curve. This is what is looks like:


Continue reading “Basic pursuit curve”

Mandelbrot fractal

This was one of my High school Computer Science projects. For obvious reasons, I cant post the source code. But all you need to do is create an Imaginary number class which adds and multiplies complex numbers. Then, you multiply, and subtract these complex numbers. If this result is infinite bound, then you color the area black. You do this recursivly. This may help.


Blog at

Up ↑