Just another WordPress.com site

Lightbulb Drawing

This is what a real lightbulb looks like:

This is the hand-drawing I made (the stuff to the side are the mathematical stuff to extract the geometric constants).  The picture is a little grainy, because, like all the other drawings,this was taken by webcam.

And this, is the actual computer version of my geometric interpretation of the silhouette of a lightbulb.  Ignore the dot.  And the line below the lightbulb is the wire supplying the electricity.  It’s technically a part of the lightbulb apparatus.


And now, you can make lightbulbs too!  All you need is a JFrame that paints a full black screen, then copy-paste this code in front of the black screen in your paint method, with the graphics object being called “g”.  This is java code, and will not work in a C program, or Python, or C++, or Pascal, or Whirl, or PHP, or Perl, or Assembly, or Befunge, or Basic.

for (int i=0;i<=6;i++) {
if (i!=3) {
for (int i=0;i<=3;i++) {

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Tag Cloud

%d bloggers like this: