Mike Lodato

Blog

Blog

WebApps

Github

About

I am a software developer who is enthusiastic about many subjects, including algorithms, computer graphics, analog/digital electronics, science, and engineering.

I use this space to organize my thoughts on various subjects, which may be incomplete or inaccurate, but may still have value for those willing to excercise a bit of skepticism.

Source code for all demos can be found here.

Old Code - Graphy

2015 Apr 30, Thu

I wrote this graphing program a while ago (2011?) to test WebGL. At the time, WebGL had only just been released and was still experimental in the browsers which supported it.

Graphy plots complex functions of two real values (x and y). The green surface represents the real part of the result, while the red surface represents the imaginary part. A hatching effect is used as a simple order-independent transparency (OIT) solution.

Syntax

  • input: <expression_with_assignments>
  • expression_with_assignments:
    • <expression>
    • <assignments><expression>
  • assignments:
    • <assignment>
    • <assignments><assignment>
  • assignment: <variable>=<expression>;

Binary Operators

  • Addition (+)
  • Subtraction (-)
  • Multiplication (*)
  • Division (/)
  • Modulo (%)
  • Exponentiation (^)

Unary Operators

  • Negation (-)
  • Sine (sin)
  • Arcsine (asin)
  • Cosine (cos)
  • Arccosine (acos)
  • Tangent (tan)
  • Arctangent (atan)
  • Natural Logarithm (ln)
  • Common Logarithm (lg)
  • Binary Logarithm (lb)
  • Exponential Function (exp)
  • Real Part (re)
  • Imaginary Part (im)
  • Absolute Value (abs)
  • Square Root (sqrt)
  • Ceiling (ceil)
  • Floor (floor)

Constants

  • Base of the Natural Logarithm (e)
  • Pi (pi)
  • Imaginary Unit (i)

Brackets

  • Parenthesis ()
  • Square Brackets []
  • Curly Brackets {}

Special Operators

  • Assignment (=)
  • Assignment Separator (;)