GMU:Wild Type/Part1: Difference between revisions

From Medien Wiki
(Created page with "<source lang="java"> void setup() { size(400, 400); noFill(); } void draw() { int gap = 30; int pos = 228; int maxheight = 303; int thickness = 1; int dx = 163; ...")
 
(write up of the 1st lecture)
Line 1: Line 1:
=From Point to Line to Letter =
== Font Representation ==
Fonts can be represented as
* Raster Graphics or Pixel Graphics
* Vector-Graphics
** Outlines or Midlines
** Curves or Line Segments
** Circular Arcs or Bezier-Curves
What are the pros and cons of the various representations?
== Parametric Letters ==
=== Letter J example ===
* This is an example of a parametric `J` for Processing 3.0.
* It uses midlines rather than the outlines to represent the letter
* `tweak` the sketch to play with the parameters.
==== Screenshot ====
''to be done''
==== Source Code ====
<source lang="java">
<source lang="java">


Line 23: Line 50:
}
}
</source>
</source>
== Examples ==
''to be done''
== Homework ==
# Pick a letter from the alphabet and create your own parametric letter
# Put the source code and a screen shot onto your user page fot this course

Revision as of 15:32, 26 October 2015

From Point to Line to Letter

Font Representation

Fonts can be represented as

  • Raster Graphics or Pixel Graphics
  • Vector-Graphics
    • Outlines or Midlines
    • Curves or Line Segments
    • Circular Arcs or Bezier-Curves

What are the pros and cons of the various representations?

Parametric Letters

Letter J example

  • This is an example of a parametric `J` for Processing 3.0.
  • It uses midlines rather than the outlines to represent the letter
  • `tweak` the sketch to play with the parameters.

Screenshot

to be done

Source Code

void setup() {
  size(400, 400);
  noFill();
}

void draw() {

  int gap = 30;
  int pos = 228;
  int maxheight = 303;
  int thickness = 1;
  int dx = 163;
  int dy = 186;

  background(0);
  stroke(255);
  strokeWeight(thickness);
  line(pos, gap, pos, maxheight - gap);
  arc(pos - dx/2, maxheight - gap, dx, dy, 0, PI);
  
}

Examples

to be done

Homework

  1. Pick a letter from the alphabet and create your own parametric letter
  2. Put the source code and a screen shot onto your user page fot this course