Selected Courses on Digital Art-UOWM

8 Απριλίου 2013

js-html-domain-edu-

Filed under: Notes — admin @ 03:34


JavaScript is a Scripting Language

A scripting language is a lightweight programming language.
JavaScript is programming code that can be inserted into HTML pages.
JavaScript inserted into HTML pages, can be executed by all modern web browsers.
JavaScript is easy to learn.

Example

document.write(“

This is a heading

“);
document.write(“

This is a paragraph

“);

example listed below about the boolean object

Boolean Object

The Boolean object represents two values: “true” or “false”.
The following code creates a Boolean object called myBoolean:
var myBoolean=new Boolean();
If the Boolean object has no initial value, or if the passed value is one of the following:
  • 0
  • -0
  • null
  • “”
  • false
  • undefined
  • NaN
the object is set to false. For any other value it is set to true (even with the string “false”)!

http://backbone.codeschool.com/levels/1

JavaScript® (often shortened to JS) is a lightweight, interpreted, object-oriented language with first-class functions, most known as the scripting language for Web pages, but used in many non-browser environmentsas well such as node.js or Apache CouchDB.
The JavaScript standard is ECMAScript. As of 2012, all modern browsers fully support ECMAScript 5.1. Older browsers support at least ECMAScript 3. A 6th major revision of the standard is in the works. The current progress of different new and improved features can be followed on the dedicated wiki.
This section of the site is dedicated to the JavaScript language itself, the parts that are not specific to Web pages, or other host environments. For information about APIs specific to Web pages, please see DOM. Read more about how DOM and JavaScript fit together in the DOM Reference.

from

v

JavaScript syntax

From Wikipedia, the free encyclopedia
The syntax of JavaScript is the set of rules that define a correctly structured JavaScript program.
The examples below make use of the alert function for standard text output. The JavaScript standard library lacks an official standard text output function. However, given that JavaScript is mainly used forclient-side scripting within modern web browsers, and that almost all web browsers provide the alertfunction, alert is used in the examples.

Contents

  [hide

[edit]Origins

Brendan Eich summarized the ancestry of the syntax in the first paragraph of the JavaScript 1.1 specification[1] as follows:
JavaScript borrows most of its syntax from Java, but also inherits from Awk and Perl, with some indirect influence from Self in its object prototype system.

[edit]Basics

[edit]Case sensitivity

JavaScript is case sensitive. It is common to start the name of a constructor with a capitalised letter, and the name of a function or variable with a lower-case letter.

[edit]Whitespace and semicolons

Spacestabs and newlines used outside of string constants are called whitespace. Unlike C, whitespace in JavaScript source can directly impact semantics. Because of a technique called “automatic semicolon insertion” (ASI), some statements that are well formed when a newline is parsed will be considered complete (as if a semicolon were inserted just prior to the newline). Programmers are advised to supply statement-terminating semicolons explicitly because it may lessen unintended effects of the automatic semicolon insertion.[2]
return
a + b;

// Returns undefined. Treated as:
// return;
// a + b;
But:
a = b + c
(d + e).foo()

// Treated as:
// a = b + c(d + e).foo();

[edit]Comments

Comment syntax is the same as in C++ and many other languages.
// a short, one-line comment

/* this is a long, multi-line comment
about my script. May it one day
be great. */


/* Comments /* may not be nested */ Syntax error */

[edit]Variables

Variables in standard JavaScript have no type attached, and any value can be stored in any variable. Variables are declared with a var statement, multiple variables can be declared at once. An identifier must start with a letter, underscore (_), or dollar sign ($); subsequent characters can also be digits (0-9). Because JavaScript is case sensitive, letters include the characters “A” through “Z” (uppercase) and the characters “a” through “z” (lowercase). Starting with JavaScript 1.5, ISO 8859-1 or Unicode letters (or \uXXXX Unicode escape sequences) can be used in identifiers.[3] In certain JavaScript implementations, the at sign (@) can be used in an identifier, this is contrary to the specifications and not supported in newer implementations. Variables are lexically scoped at function level (not block level as in C), and this does not depend on order (forward declaration is not necessary): if a variable is declared inside a function (at any point, in any block), then inside the function, the name will resolve to that variable. This is equivalent in block scoping to variables being forward declared at the top of the function, and is referred to as hoisting.[4] However, the variable value is undefined until it is initialized, and forward reference is not possible. Thus a var x = 1 statement in the middle of the function is equivalent to avar x declaration statement at the top of the function, and a x = 1 assignment statement at that point in the middle of the function – only the declaration is hoisted, not the assignment.
Functions statements, whose effect is to declare a variable of type Function and assign a value to it, are similar to variable statements, but in addition to hoisting the declaration, they also hoist the assignment – as if the entire statement appeared at the top of the containing function – and thus forward reference is also possible: the location of a function statement within an enclosing function is irrelevant.
Block scoping can be produced by wrapping the entire block in a function and then executing it; this is known as the immediately-invoked function expression pattern.
Variables declared outside any function are global. If a variable is declared in a higher scope, it can be accessed by child functions.
Here is an example of variable declarations and global values:
var x = 0; // A global variable, because it is not in any function

function f() {
var z = 'foxes', r = 'birds'; // 2 local variables
m = 'fish'; // global because it wasn't declared anywhere before
function child() {
var r = 'monkeys'; // This variable is local and does not affect the "birds" r of the parent function.
z = 'penguins'; // The child function is able to access the variables of the parent function, this is called closure.
}
twenty = 20; // This variable is declared on the next line, but usable anywhere in the function, even before, as here
var twenty;
child();
return x; // We can use x here because it is global
}
f();
alert(z); // This line will raise a ReferenceError exception because the value of z is no longer available
When JavaScript tries to resolve an identifier, it looks in the local function scope. If this identifier is not found, it looks in the outer function that declared the local one, and so on along the scope chain until it reaches the global scope where global variables reside. If it is still not found, JavaScript will raise a ReferenceError exception.
When assigning an identifier, JavaScript does exactly the same process to retrieve this identifier, except that if it is not found in the global scope, it will create the “variable” as a property of the global object.[5] As a consequence, a variable never declared will be global if assigned. Declaring a variable (with the keyword var) in the global code (i.e. outside of any function body), assigning a never declared identifier or adding a property to theglobal object (usually window) will also create a new global variable.
Note that JavaScript’s strict mode forbids the assignment of an undeclared variable, which avoids global namespace pollution.

[edit]Primitive data types

The JavaScript language provides a handful of primitive data types. Some of the primitive data types also provide a set of named values that represent the extents of the type boundaries. These named values are described within the appropriate sections below.

[edit]Undefined

The value of “undefined” is assigned to all uninitialized variables, and is also returned when checking for object properties that do not exist. In a Boolean context, the undefined value is considered a false value.
Note: undefined is considered a genuine primitive type. Unless explicitly converted, the undefined value may behave unexpectedly in comparison to other types that evaluate to false in a logical context.
var test;                  // variable declared but not defined, ...
// ... set to value of undefined
var testObj = {};
alert(test); // test variable exists but value not ...
// ... defined, displays undefined
alert(testObj.myProp); // testObj exists, property does not, ...
// ... displays undefined
alert(undefined == null); // unenforced type during check, displays true
alert(undefined === null); // enforce type during check, displays false
Note: There is no built-in language literal for undefined. Thus (x == undefined) is not a foolproof way to check whether a variable is undefined, because in versions before ECMAScript 5, it is legal for someone to write var undefined = "I'm defined now";. A more robust approach is to compare using (typeof x === 'undefined').
Functions like this won’t work as expected:
function isUndefined(x) { var u; return x === u; } // like this...
function isUndefined(x) { return x === void 0; } // ... or that one
Here, calling isUndefined(my_var) raises a ReferenceError if my_var is an unknown identifier, whereas typeof my_var === 'undefined'doesn’t.

[edit]Null

Unlike undefined, null is often set to indicate that something has been declared but has been defined to be empty. In a Boolean context, the value of null is considered a false value in JavaScript.
Note: Null is a true primitive-type within the JavaScript language, of which null (note case) is the single value. As such, when performing checks that enforced type checking, the null value will not equal other false types. Surprisingly, null is considered an object by typeof.
alert(null == undefined);         // unenforced type during check, displays true
alert(null === undefined); // enforce type during check, displays false
alert(typeof null === 'object'); // true

[edit]Number

Numbers are represented in binary as IEEE-754 Doubles, which provides an accuracy nearly 16 significant digits. Because they are floating pointnumbers, they do not always exactly represent real numbers, including fractions.
This becomes an issue when comparing or formatting numbers. For example:
alert(0.2 + 0.1 == 0.3); // displays false
alert(0.94 - 0.01); // displays 0.9299999999999999
As a result, a routine such as the toFixed() method should be used to round numbers whenever they are formatted for output.
Numbers may be specified in any of these notations:
345;    // an "integer", although there is only one numeric type in JavaScript
34.5; // a floating-point number
3.45e2; // another floating-point, equivalent to 345
0377; // an octal integer equal to 255
0xFF; // a hexadecimal integer equal to 255, digits represented by the ...
// ... letters A-F may be upper or lowercase
The extents +∞−∞ and NaN (Not a Number) of the number type may be obtained by two program expressions:
Infinity;  // Positive Infinity (negative obtained with -Infinity for instance)
NaN; // The Not-A-Number value, also returned as a failure in ...
// ... string-to-number conversions
These three special values correspond and behave as the IEEE-754 describes them.
The Number constructor, or a unary + or -, may be used to perform explicit numeric conversion:
var myString = "123.456";
var myNumber1 = Number(myString);
var myNumber2 = +myString;
When used as a constructor, a numeric wrapper object is created (though it is of little use):
myNumericWrapper = new Number(123.456);

[edit]String

string in JavaScript is a sequence of characters. In JavaScript, strings can be created directly by placing the series of characters between double or single quotes.
var greeting = "Hello, world!";
var anotherGreeting = 'Greetings, people of Earth.';
You can access individual characters within a string using the charAt method (provided by String.prototype). This is the preferred way when accessing individual characters within a string because it also works in non-modern browsers:
var h = greeting.charAt(0);
In modern browsers, individual characters within a string can be accessed (as strings with only a single character) through the same notation as arrays:
var h = greeting[0];
However, JavaScript strings are immutable:
greeting[0] = "H"; // Not working.
Applying the equality operator (“==”) to two strings returns true if the strings have the same contents, which means: of same length and same cases (for alphabets). Thus:
var x = "world";
var compare1 = ("Hello, " +x == "Hello, world"); // Now compare1 contains true.
var compare2 = ("Hello, " +x == "hello, world"); // Now compare2 contains ...
// ... false since the ...
// ... first characters ...
// ... of both operands ...
// ... are not of the same case.
You cannot use quotes of the same type inside the quotes unless they are escaped.
var x = '"Hello, world!" he said.' // Just fine.
var x = ""Hello, world!" he said." // Not good.
var x = "\"Hello, world!\" he said." // That works by replacing " with \"
It is possible to create a string using the String constructor:
var greeting = new String("Hello, world!");
These objects have a valueOf method returning the primitive string wrapped into them:
var s = new String("Hello !");
typeof s; // Is 'object'.
typeof s.valueOf(); // Is 'string'.
Equality between two String objects does not behave as with string primitives:
var s1 = new String("Hello !");
var s2 = new String("Hello !");
s1 == s2; // Is false, because they are two distinct objects.
s1.valueOf() == s2.valueOf(); // Is true.

[edit]Boolean

JavaScript provides a Boolean data type with true and false literals. The typeof operator returns the string "boolean" for these primitive types. When used in a logical context, 0-0nullNaNundefined, and the empty string ("") evaluate as false due to automatic type coercion. Thecomplement evaluates as true, including the strings "0""false" and any object (except null). Automatic type coercion by the equality comparison operators (== and !=) can be avoided by using the type checked comparison operators, (=== and !==).
When type conversion is required, JavaScript converts String, Number, Boolean, or Object operands as follows:[6]
Number and String
The string is converted to a number value. JavaScript attempts to convert the string numeric literal to a Number type value. First, a mathematical value is derived from the string numeric literal. Next, this value is rounded to nearest Number type value.
Boolean
If one of the operands is a Boolean, the Boolean operand is converted to 1 if it is true or to 0 if it is false.
Object
If an object is compared with a number or string, JavaScript attempts to return the default value for the object. An object is converted to a primitive String or Number value, using the .valueOf() or .toString() methods of the object. If this fails, a runtime error is generated.
Douglas Crockford advocates the terms “truthy” and “falsy” to describe how values of various types behave when evaluated in a logical context, especially in regard to edge cases.[7] The binary logical operators returned a Boolean value in early versions of JavaScript, but now they return one of the operands instead. The left–operand is returned if it can be evaluated as: false, in the case of conjunction (a && b), or true, in the case ofdisjunction (a || b); otherwise the right–operand is returned. Automatic type coercion by the comparison operators may differ for cases of mixed boolean and number-compatible operands (including strings that can be evaluated as a number, or objects that can be evaluated as such a string) because the boolean operand will be compared as a numeric value. This may be unexpected. An expression can be explicitly cast to a boolean primitive by doubling the logical negation operator (!!), using the Boolean() function, or using the conditional operator (c ? t : f).
//Automatic type coercion
alert(true == 2 ); // false... true → 1 !== 2 ← 2
alert(false == 2 ); // false... false → 0 !== 2 ← 2
alert(true == 1 ); // true.... true → 1 === 1 ← 1
alert(false == 0 ); // true.... false → 0 === 0 ← 0
alert(true == "2"); // false... true → 1 !== 2 ← "2"
alert(false == "2"); // false... false → 0 !== 2 ← "2"
alert(true == "1"); // true.... true → 1 === 1 ← "1"
alert(false == "0"); // true.... false → 0 === 0 ← "0"
alert(false == "" ); // true.... false → 0 === 0 ← ""
alert(false == NaN); // false... false → 0 !== NaN

//Type checked comparison (no conversion of types and values)
alert(true === 1); // false... data types do not match

//Explicit type coercion
alert(true === !!2); // true.... data types and values match
alert(true === !!0); // false... data types match but values differ
alert( 1 ? true : false); // true.... only ±0 and NaN are “falsy” numbers
alert("0" ? true : false); // true.... only the empty string is “falsy”
alert(Boolean({})); // true.... all objects are “truthy” except null
The new operator can be used to create an object wrapper for a Boolean primitive. However, the typeof operator does not return "boolean" for the object wrapper, it returns "object". Because all objects evaluate as true, a method such as .valueOf(), or .toString(), must be used to retrieve the wrapped value. For explicit coercion to the Boolean type, Mozilla recommends that the Boolean() function (without new) be used in preference to the Boolean object.
var b = new Boolean(false);   // Object  false {}
var t = Boolean(b); // Boolean true
var f = Boolean(b.valueOf()); // Boolean false
var n = new Boolean(b); // Not recommended
n = new Boolean(b.valueOf()); // Preferred

if (0 || -0 || "" || null || undefined || b.valueOf() || !new Boolean() || !t) {
alert("Never this");
} else if ([] && {} && b && typeof b === "object" && b.toString() === "false") {
alert("Always this");
}

[edit]Native objects

The JavaScript language provides a handful of native objects. JavaScript native objects are considered part of the JavaScript specification. JavaScript environment notwithstanding, this set of objects should always be available.

[edit]Array

An Array is a JavaScript object prototyped from the Array constructor specifically designed to store data values indexed by integer keys. Arrays, unlike the basic Object type, are prototyped with methods and properties to aid the programmer in routine tasks (for example, joinslice, and push).
As in the C family, arrays use a zero-based indexing scheme: A value that is inserted into an empty array by means of the push method occupies the 0th index of the array.
var myArray = [];            // Point the variable myArray to a newly ...
// ... created, empty Array
myArray.push("hello world"); // Fill the next empty index, in this case 0
alert(myArray[0]); // Equivalent to alert("hello world");
Arrays have a length property that is guaranteed to always be larger than the largest integer index used in the array. It is automatically updated if one creates a property with an even larger index. Writing a smaller number to the length property will remove larger indices.
Elements of Arrays may be accessed using normal object property access notation:
myArray[1];   // the 2nd item in myArray
myArray["1"];
The above two are equivalent. It’s not possible to use the “dot”-notation or strings with alternative representations of the number:
myArray.1;     // syntax error
myArray["01"]; // not the same as myArray[1]
Declaration of an array can use either an Array literal or the Array constructor:
myArray = [0, 1,, , 4, 5];            // array with length 6 and 6 elements, ...
// ... including 2 undefined elements
myArray = new Array(0, 1, 2, 3, 4, 5); // array with length 6 and 6 elements
myArray = new Array(365); // an empty array with length 365
Arrays are implemented so that only the elements defined use memory; they are “sparse arrays“. Setting myArray[10] = 'someThing' andmyArray[57] = 'somethingOther' only uses space for these two elements, just like any other object. The length of the array will still be reported as 58.
One can use the object declaration literal to create objects that behave much like associative arrays in other languages:
dog = {color: "brown", size: "large"};
dog["color"]; // results in "brown"
dog.color; // also results in "brown"
One can use the object and array declaration literals to quickly create arrays that are associative, multidimensional, or both. (Technically, JavaScript does not support multidimensional arrays, but one can mimic them with arrays-of-arrays.)
cats = [{color: "brown", size: "large"},
{color: "black", size: "small"}];
cats[0]["size"]; // results in "large"

dogs = {rover: {color: "brown", size: "large"},
spot: {color: "black", size: "small"}};
dogs["spot"]["size"]; // results in "small"
dogs.rover.color; // results in "brown"

[edit]Date

A Date object stores a signed millisecond count with zero representing 1970-01-01 00:00:00 UT and a range of ±108 days. There are several ways of providing arguments to the Date constructor. Note that months are zero-based.
new Date()                       // create a new Date instance representing the current time/date.
new Date(2010, 2, 1) // create a new Date instance representing 2010-Mar-01 00:00:00
new Date(2010, 2, 1, 14, 25, 30) // create a new Date instance representing 2010-Mar-01 14:25:30
new Date("2010-3-1 14:25:30") // create a new Date instance from a String.
Methods to extract fields are provided, as well as a useful toString:
var d = new Date(2010, 2, 1, 14, 25, 30); // 2010-Mar-01 14:25:30

// Displays '2010-3-1 14:25:30':
alert(d.getFullYear() + '-' + (d.getMonth()+1) + '-' + d.getDate() + ' '
+ d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds());

// Built-in toString returns something like 'Mon Mar 01 2010 14:25:30 GMT-0500 (EST)':
alert(d);

[edit]Error

Custom error messages can be created using the Error class:
throw new Error("Something went wrong.");
Nested within conditional statements, such instantiations can substitute for try/catch blocks:
var emailAddress = prompt("Please enter your e-mail address:", "");
if (!emailAddress || emailAddress.length == 0) {
throw new Error("Excuse me: You must enter your e-mail address to continue.");
}

[edit]Math

The Math object contains various math-related constants (for example, π) and functions (for example, cosine). (Note the “Math” object has no constructor, unlike Array or Date. All its methods are “static”, AKA “class” methods.) All the trigonometric functions use angles expressed in radians, not degrees or grads.
Properties of the Math object
Property Returned value
rounded to 5 digits
Description
Math.E 2.7183 e: Natural logarithm base
Math.LN2 0.69315 Natural logarithm of 2
Math.LN10 2.3026 Natural logarithm of 10
Math.LOG2E 1.4427 Logarithm to the base 2 of e
Math.LOG10E 0.43429 Logarithm to the base 10 of e
Math.PI 3.14159 π: circumference/diameter of a circle
Math.SQRT1_2 0.70711 Square root of ½
Math.SQRT2 1.4142 Square root of 2
Methods of the Math object
Example Returned value
rounded to 5 digits
Description
Math.abs(-2.3) 2.3 Absolute value: (x < 0) ? -x : x
Math.acos(Math.SQRT1_2) 0.78540 rad. = 45° Arccosine
Math.asin(Math.SQRT1_2) 0.78540 rad. = 45° Arcsine
Math.atan(1) 0.78540 rad. = 45° Half circle arctangent (-π/2 to +π/2)
Math.atan2(-3.7, -3.7) -2.3562 rad. = -135° Whole circle arctangent (-π to +π)
Math.ceil(1.1) 2 Ceiling: round up to smallest integer ≥ argument
Math.cos(Math.PI/4) 0.70711 Cosine
Math.exp(1) 2.7183 Exponential functione raised to this power
Math.floor(1.9) 1 Floor: round down to largest integer ≤ argument
Math.log(Math.E) 1 Natural logarithm, base e
Math.max(1, -2) 1 Maximum: (x > y) ? x : y
Math.min(1, -2) -2 Minimum: (x < y) ? x : y
Math.pow(-3, 2) 9 Exponentiation (raised to the power of): Math.pow(x, y) gives xy
Math.random() 0.17068 Pseudorandom number between 0 (inclusive) and 1 (exclusive)
Math.round(1.5) 2 Round to the nearest integer; half fractions are rounded up (e.g. 1.5 rounds to 2)
Math.sin(Math.PI/4) 0.70711 Sine
Math.sqrt(49) 7 Square root
Math.tan(Math.PI/4) 1 Tangent

[edit]Regular expression

/expression/.test(string);
"string".search(/expression/);
"string".replace(/expression/,replacement);

// Here are some examples
if(/Tom/.test("My name is Tom")) alert("Hello Tom!");
alert("My name is Tom".search(/Tom/)); // == 11 (letters before Tom)
alert("My name is Tom".replace(/Tom/,"John")); // == "My name is John"

[edit]Character classes

// \d   - digit
// \D - non digit
// \s - space
// \S - non space
// \w - word char
// \W - non word
// [ ] - one of
// [^ ] - one not of
// - - range

if (/\d/.test('0')) alert('Digit');
if (/[0-9]/.test('6')) alert('Digit');
if (/[13579]/.test('1')) alert('Odd number');
if (/\S\S\s\S\S\S\S/.test('My name')) alert('Format OK');
if (/\w\w\w/.test('Tom')) if (/[a-zA-Z]/.test('B')) alert('Letter');

[edit]Character matching

// A...Z a...z 0...9  - alphanumeric
// \u0000...\uFFFF - Unicode hexadecimal
// \x00...\xFF - ASCII hexadecimal
// \t - tab
// \n - new line
// \r - CR
// . - any character
// | - OR

if (/T.m/.test('Tom')) alert ('Hi Tom, Tam or Tim');
if (/A|B/.test("A")) alert ('A or B');

[edit]Repeaters

// ?     - 0 or 1 match
// * - 0 or more
// + - 1 or more
// {n} - exactly n
// {n,} - n or more
// {0,n} - n or less
// {n,m} - range n to m

if (/ab?c/.test("ac")) alert("OK"); // match: "ac", "abc"
if (/ab*c/.test("ac")) alert("OK"); // match: "ac", "abc", "abbc", "abbbc" etc.
if (/ab+c/.test("abc")) alert("OK"); // match: "abc", "abbc", "abbbc" etc.
if (/ab{3}c/.test("abbbc")) alert("OK"); // match: "abbbc"
if (/ab{3,}c/.test("abbbc")) alert("OK"); // match: "abbbc", "abbbbc", "abbbbbc" etc.
if (/ab{1,3}c/.test("abc")) alert("OK"); // match: "abc","abbc", "abbbc"

[edit]Anchors

// ^   - string starts with
// $ - string ends with

if (/^My/.test("My name is Tom")) alert ("Hi!");
if (/Tom$/.test("My name is Tom")) alert ("Hi Tom!");

[edit]Subexpression

// ( )   - groups characters

if (/water(mark)?/.test("watermark")) alert("Here is water!"); // match: "water", "watermark",
if (/(Tom)|(John)/.test("John")) alert("Hi Tom or John!");

[edit]Flags

// /g   - global
// /i - ignore upper/lower case
// /m - allow matches to span multiple lines

alert("hi tom!".replace(/Tom/i,"John")); // == "hi John!"
alert("ratatam".replace(/ta/,"tu")); // == "ratutam"
alert("ratatam".replace(/ta/g,"tu")); // == "ratutum"

[edit]Advanced methods

my_array = my_string.split(my_delimiter);
// example
my_array = "dog,cat,cow".split(","); // my_array==("dog","cat","cow");

my_array = my_string.match(my_expression);
// example
my_array = "We start at 11:30, 12:15 and 16:45".match(/\d\d:\d\d/g); // my_array=("11:30","12:15","16:45");

[edit]Capturing groups

var myRe = /(\d{4}-\d{2}-\d{2}) (\d{2}:\d{2}:\d{2})/;
var results = myRe.exec("The date and time are 2009-09-08 09:37:08.");
if (results) {
alert("Matched: " + results[0]); // Entire match
var my_date = results[1]; // First group == "2009-09-08"
var my_time = results[2]; // Second group == "09:37:08"
alert("It is " + my_time + " on " + my_date);
} else alert("Did not find a valid date!");

[edit]Function

Every function in JavaScript is an instance of the Function object:
//x,y is the argument. 'return x+y' is the function body, which is the last in the argument list.
var add = new Function('x', 'y', 'return x+y');
var t = add(1, 2);
alert(t); //3
The add function above may also be defined using the following pattern.
function add(x, y) {
return x + y;
}
var t = add(1, 2);
alert(t); //3
A function instance has properties and methods.
function subtract(x, y) {
return x - y;
}

alert(subtract.length);//2,expected amount of arguments.
alert(subtract.toString());

/*
function subtract(x, y) {
return x - y;
}
*/

[edit]Operators

The ‘+’ operator is overloaded: it is used for string concatenation and arithmetic addition. This may cause problems when inadvertently mixing strings and numbers. As a unary operator, it can convert a numeric string to a number.
// Concatenate 2 strings
alert('He' + 'llo'); // displays Hello

// Add two numbers
alert(2 + 6); // displays 8

// Adding a number and a string results in concatenation
alert(2 + '2'); // displays 22
alert('$' + 3 + 4); // displays $34, but $7 may have been expected
alert('$' + (3 + 4)); // displays $7

// Convert a string to a number
alert(+'2' === 2); // displays true
alert(+'Hello'); // displays NaN

[edit]Arithmetic

JavaScript supports the following binary arithmetic operators:
+     Addition
- Subtraction
* Multiplication
/ Division (returns a floating-point value)
% Modulus (returns the integer remainder)
JavaScript supports the following unary arithmetic operators:
+     Unary conversion of string to number
- Unary negation (reverses the sign)
++ Increment (can be prefix or postfix)
-- Decrement (can be prefix or postfix)
var x = 1;
alert(++x); // displays: 2
alert(x++); // displays: 2; x becomes 3 then
alert(x); // displays: 3
alert(x--); // displays: 3; x becomes 2 then
alert(x); // displays: 2
alert(--x); // displays: 1

[edit]Assignment

=     Assign
+= Add and assign
-= Subtract and assign
*= Multiply and assign
/= Divide and assign
%= Modulus and assign
Assignment of primitive types
var x = 9;
x += 1;
alert(x); // displays: 10
x *= 30;
alert(x); // displays: 300
x /= 6;
alert(x); // displays: 50
x -= 3;
alert(x); // displays: 47
x %= 7;
alert(x); // displays: 5
Assignment of object types
var obj_1 = {a: 1}; // assign reference of newly created object to variable obj_1
var obj_2 = {a: 0};
var obj_3 = obj_2; // obj_3 references the same object as obj_2 does

obj_2.a = 2;
alert(obj_1.a + " " + obj_2.a + " " + obj_3.a); // displays 1 2 2

obj_2 = obj_1; // obj_2 now references the same object as variable obj_1
// obj_3 now the only reference to what obj_2 referenced
alert(obj_1.a + " " + obj_2.a + " " + obj_3.a); // displays 1 1 2

obj_2.a = 7;// modifies obj_1
alert(obj_1.a + " " + obj_2.a + " " + obj_3.a); // displays 7 7 2

[edit]Destructuring assignment

In Mozilla’s JavaScript, since version 1.7, destructuring assignment allows the assignment of parts of data structures to several variables at once. The left hand side of an assignment is a pattern that resembles an arbitrarily nested object/array literal containing l-lvalues at its leafs which are to receive the substructures of the assigned value.
var a, b, c, d, e;
[a, b] = [3, 4];
alert(a + ',' + b); // displays: 3,4
e = {foo: 5, bar: 6, baz: ['Baz', 'Content']};
var arr = [];
({baz: [arr[0], arr[3]], foo: a, bar: b}) = e;
alert(a + ',' + b + ',' + arr); // displays: 5,6,Baz,,,Content
[a, b] = [b, a]; // swap contents of a and b
alert(a + ',' + b); // displays: 6,5

[edit]Comparison

==    Equal
!= Not equal
> Greater than
>= Greater than or equal to
< Less than
<= Less than or equal to
=== Identical (equal and of the same type)
!== Not identical
When comparing variables which are objects they are considered to be different if their objects are not the same object, even if the values of them are the same, so:
var obj1 = {a: 1};
var obj2 = {a: 1};
var obj3 = obj1;
alert(obj1 == obj2); //false
alert(obj3 == obj1); //true
See also String.

[edit]Logical

JavaScript provides four logical operators:
In the context of a logical operation, any expression evaluates to true except the following:
  • Strings: "", '',
  • Numbers: 0, -0, NaN,
  • Special: null, undefined,
  • Boolean: false.
The Boolean function can be used to explicitly convert to a primitive of type Boolean:
// Only empty strings return false
alert(Boolean("") === false);
alert(Boolean("false") === true);
alert(Boolean("0") === true);

// Only zero and NaN return false
alert(Boolean(NaN) === false);
alert(Boolean(0) === false);
alert(Boolean(-0) === false); // equivalent to -1*0
alert(Boolean(-2) === true );

// All objects return true
alert(Boolean(this) === true);
alert(Boolean({}) === true);
alert(Boolean([]) === true);

// These types return false
alert(Boolean(null) === false);
alert(Boolean(undefined) === false); // equivalent to Boolean()
The NOT operator evaluates its operand as a Boolean, and returns the negation. Using the operator twice in a row, as a double negative, explicitly converts an expression to a primitive of type Boolean:
alert( !0 === Boolean(!0));  alert(Boolean(!0) === !!1);    alert(!!1 === Boolean(1));
alert(!!0 === Boolean(0)); alert(Boolean(0) === !1); alert(!1 === Boolean(!1));
alert(!"" === Boolean(!"")); alert(Boolean(!"") === !!"s"); alert(!!"s" === Boolean("s"));
alert(!!"" === Boolean("")); alert(Boolean("") === !"s"); alert(!"s" === Boolean(!"s"));
The ternary operator can also be used for explicit conversion:
alert([] == false);  alert([] ? true : false); // “truthy”, but the comparison uses [].toString()
alert([0] == false); alert([0]? true : false); // [0].toString() == "0"
alert("0" == false); alert("0"? true : false); // "0" → 0 … (0==0) … 0 ← false
alert([1] == true); alert([1]? true : false); // [1].toString() == "1"
alert("1" == true); alert("1"? true : false); // "1" → 1 … (1==1) … 1 ← true
alert([2] != true); alert([2]? true : false); // [2].toString() == "2"
alert("2" != true); alert("2"? true : false); // "2" → 2 … (2!=1) … 1 ← true
Expressions that use features such as post–incrementation, (i++), have an anticipated side effect. JavaScript provides short-circuit evaluation of expressions; the right operand is only executed if the left operand does not suffice to determine the value of the expression.
alert(a || b);    // When a is true, there is no reason to evaluate b.
alert(a && b); // When a is false, there is no reason to evaluate b.
alert(c ? t : f); // When c is true, there is no reason to evaluate f.
In early versions of JavaScript and JScript, the binary logical operators returned a Boolean value (like most C–derived programming languages). However, all contemporary implementations return one of their operands instead:
alert(a || b); // if a is true, return a, otherwise return b
alert(a && b); // if a is false, return a, otherwise return b
Programmers who are more familiar with the behavior in C might find this feature surprising, but it allows for a more concise expression of patterns likenull coalescing:
var s = t || "(default)"; // assigns t, or the default value if t is null, empty, etc.

[edit]Bitwise

JavaScript supports the following binary bitwise operators:
&     And
| Or
^ Xor

<< Shift left (zero fill)
>> Shift right (sign-propagating); copies of the leftmost bit (sign bit) are shifted in from the
left.
>>> Shift right (zero fill)

For positive numbers, >> and >>> yield the same result.
JavaScript supports the following unary bitwise operators:
~     Not (inverts the bits)

[edit]String

=     Assignment
+ Concatenation
+= Concatenate and assign
Examples
str = "ab" + "cd";   // "abcd"
str += "e"; // "abcde"

str2 = "2"+2 // "22", not "4" or 4.

[edit]Control structures

[edit]Compound statements

A pair of curly brackets { } and an enclosed sequence of statements constitute a compound statement, which can be used wherever a statement can be used.

[edit]If … else

if (expr) {
//statements;
} else if (expr2) {
//statements;
} else {
//statements;
}
this is also possible
if (exprA exprB) {
//statements;
} else if (expr2) {
//statements;
} else {
//statements;
}

[edit]Conditional operator

The conditional operator creates an expression that evaluates as one of two expressions depending on a condition. This is similar to the if statement that selects one of two statements to execute depending on a condition. I.e., the conditional operator is to expressions what if is to statements.
 result = condition ? expression : alternative;
is the same as:
 if (condition) {
result = expression;
} else {
result = alternative;
}
Unlike the if statement, the conditional operator cannot omit its “else-branch”.

[edit]Switch statement

The syntax of the JavaScript Switch statement is as follows:
 switch (expr) {
case SOMEVALUE:
//statements;
break;
case ANOTHERVALUE:
//statements;
break;
default:
//statements;
break;
}
  • break; is optional; however, it is usually needed, since otherwise code execution will continue to the body of the next case block.
  • Add a break statement to the end of the last case as a precautionary measure, in case additional cases are added later.
  • Strings literal values can also be used for the case values.
  • Expressions can be used instead of values.
  • case default: is optional.
  • Braces are required.

[edit]For loop

The syntax of the JavaScript for loop is as follows:
 for (initial; condition; loop statement) {
/*
statements will be executed every time
the for{} loop cycles, while the
condition is satisfied
*/

}
or
 for (initial; condition; loop statement(iteration)) // one statement

[edit]For … in loop

The syntax of the JavaScript For … in loop is as follows:
 for (var property_name in some_object) {
//statements using some_object[property_name];
}
  • Iterates through all enumerable properties of an object.
  • Iterates through all used indices of array including all user-defined properties of array object if any. Thus it may be better to use a traditional for loop with a numeric index when iterating over arrays.
  • There are differences between the various web browsers with regard to which properties will be reflected with the for…in loop statement. In theory, this is controlled by an internal state property defined by the ECMAscript standard called “DontEnum”, but in practice each browser returns a slightly different set of properties during introspection. It is useful to test for a given property using if (some_object.hasOwnProperty(property_name)) { ... }. Thus, adding a method to the array prototype withArray.prototype.newMethod = function() {...} may cause for … in loops to loop over the method’s name.

[edit]While loop

The syntax of the JavaScript while loop is as follows:
 while (condition) {
statement1;
statement2;
statement3;
...
}

[edit]Do … while loop

The syntax of the JavaScript do … while loop is as follows:
 do {
statement1;
statement2;
statement3;
...
} while (condition);

[edit]With

The with statement sets the default object for the set of statements that follow.
 with (document) {
var a = getElementById('a');
var b = getElementById('b');
var c = getElementById('c');
};
  • Note the absence of document. before each getElementById() invocation.
The semantics are similar to the with statement of Pascal.

[edit]Labels

JavaScript supports nested labels in most implementations. loops or blocks can be labeled for the break statement, and loops for continue. Althoughgoto is a reserved word,[8] goto is not implemented in JavaScript.
loop1: for (var a = 0; a < 10; a++) {
if (a == 4) {
break loop1; // Stops after the 4th attempt
}
alert('a = ' + a);
loop2: for (var b = 0; b < 10; ++b) {
if (b == 3) {
continue loop2; // Number 3 is skipped
}
if (b == 6) {
continue loop1; // Continues the first loop, 'finished' is not shown
}
alert('b = ' + b);
}
alert('finished')
}
block1: {
alert('hello'); // Displays 'hello'
break block1;
alert('world'); // Will never get here
}
goto block1; // Parse error.

[edit]Functions

function is a block with a (possibly empty) parameter list that is normally given a name. A function may use local variables. If you exit the function without a return statement, the value undefined is returned.
function gcd(segmentA, segmentB) {
var diff = segmentA - segmentB;
if (diff == 0)
return segmentA;
return diff > 0 ? gcd(segmentB, diff) : gcd(segmentA, -diff);
}
alert(gcd(60, 40)); // 20

var mygcd=gcd; // mygcd is a reference to the same function as gcd. Note no argument ()s.
alert(mygcd(60, 40)); // 20
Functions are first class objects and may be assigned to other variables.
The number of arguments given when calling a function may not necessarily correspond to the number of arguments in the function definition; a named argument in the definition that does not have a matching argument in the call will have the value undefined (which can be implicitly cast to false). Within the function, the arguments may also be accessed through the arguments object; this provides access to all arguments using indices (e.g.arguments[0], arguments[1], ... arguments[n]), including those beyond the number of named arguments. (While the arguments list has a .length property, it is not an instance of Array; it does not have methods such as .slice(), .sort(), etc.)
function add7(x, y) {
if (!y) {
y = 7;
}
alert(x + y + arguments.length);
};
add7(3); // 11
add7(3, 4); // 9
All parameters are passed by value (for objects, it is the reference to the object that is passed).
var obj1 = {a : 1};
var obj2 = {b : 2};
function foo(p) {
p = obj2; // Ignores actual parameter
p.b = arguments[1];
}
foo(obj1, 3); // Does not affect obj1 at all. 3 is additional parameter
alert(obj1.a + " " + obj2.b); // writes 1 3
Functions can be declared inside other functions, and access the outer function’s local variables. Furthermore they implement full closures by remembering the outer function’s local variables even after the outer function has exited.
var v = "Top";
var bar, baz;
function foo() {
var v = "fud";
bar = function() { alert(v) };
baz = function(x) { v = x; };
}
foo();
baz("Fugly");
bar(); // Fugly (not fud) even though foo() has exited.
alert(v); // Top

[edit]Objects

For convenience, types are normally subdivided into primitives and objects. Objects are entities that have an identity (they are only equal to themselves) and that map property names to values (“slots” in prototype-based programming terminology). Objects may be thought of as associative arrays or hashes, and are often implemented using these data structures. However, objects have additional features, such as a prototype chain[clarification needed], which ordinary associative arrays do not have.
JavaScript has several kinds of built-in objects, namely Array, Boolean, Date, Function, Math, Number, Object, RegExp and String. Other objects are “host objects”, defined not by the language but by the runtime environment. For example, in a browser, typical host objects belong to the DOM (window, form, links, etc.).

[edit]Creating objects

Objects can be created using a constructor or an object literal. The constructor can use either a built-in Object function or a custom function. It is a convention that constructor functions are given a name that starts with a capital letter:
// Constructor
var anObject = new Object();

// Object literal
var objectA = {};
var objectA2 = {}; // A != A2, {}s create new objects as copies.
var objectB = {index1: 'value 1', index2: 'value 2'};

// Custom constructor (see below)
Object literals and array literals allow one to easily create flexible data structures:
var myStructure = {
name: {
first: "Mel",
last: "Smith"
},
age: 33,
hobbies: ["chess", "jogging"]
};
This is the basis for JSON, which is a simple notation that uses JavaScript-like syntax for data exchange.

[edit]Methods

method is simply a function that is assigned to the value of an object’s slot. Unlike many object-oriented languages, there is no distinction between a function definition and a method definition. Rather, the distinction occurs during function calling; a function can be called as a method.
When called as a method, the standard local variable this is just automatically set to the object instance to the left of the “.”. (There are also call andapply methods that can set this explicitly—some packages such as jQuery do unusual things with this.)
In the example below, Foo is being used as a constructor. There is nothing special about a constructor, it is just a method that is invoked after the object is created. this is set to the newly created object.
Note that in the example below, Foo is simply assigning values to slots, some of which are functions. Thus it can assign different functions to different instances. There is no prototyping in this example.
function px() {return this.prefix + "X";}

function Foo(yz) {
this.prefix = "a-";
if (yz > 0) {
this.pyz = function() {return this.prefix + "Y";};
} else {
this.pyz = function() {return this.prefix + "Z";};
}
this.m1 = px;
}

var foo1 = new Foo(1);
var foo2 = new Foo(0);
foo2.prefix = "b-";

alert("foo1/2 " + foo1.pyz() + foo2.pyz());
// foo1/2 a-Y b-Z

foo1.m3 = px; // Assigns the function itself, not its evaluated result, i.e. not px()
var baz = {"prefix": "c-"};
baz.m4 = px; // No need for a constructor to make an object.

alert("m1/m3/m4 " + foo1.m1() + foo1.m3() + baz.m4());
// m1/m3/m4 a-X a-X c-X

foo1.m2(); // Throws an exception, because foo1.m2 doesn't exist.

[edit]Constructors

Constructor functions simply assign values to slots of a newly created object. The values may be data or other functions.
Example: Manipulating an object
function MyObject(attributeA, attributeB) {
this.attributeA = attributeA;
this.attributeB = attributeB;
}

MyObject.staticC = "blue"; // On MyObject Function, not obj
alert(MyObject.staticC); // blue

obj = new MyObject('red', 1000);

alert(obj.attributeA); // red
alert(obj["attributeB"]); // 1000

alert(obj.staticC); // undefined
obj.attributeC = new Date(); // add a new property

delete obj.attributeB; // remove a property of obj
alert(obj.attributeB); // undefined

delete obj; // remove the whole Object (rarely used)
alert(obj.attributeA); // throws an exception
The constructor itself is stored in the special slot constructor. So
function Foo(){}
// Use of 'new' sets prototype and constructor slots (for example,
// Foo.prototype = {}; // would set constructor to Object).
x = new Foo();
// The above is almost equivalent to
y = {};
y.constructor = Foo;
y.constructor();
// Except
x.constructor == y.constructor // true
x instanceof Foo // true
y instanceof Foo // false
z = new {constructor: Foo}.constructor();
z instanceof Foo // true.
// Changing Foo.prototype after 'new' has been called can change the
// instanceof results, until it is changed back with the identical value.
Functions are objects themselves, which can be used to produce an effect similar to “static properties” (using C++/Java terminology) as shown below. (The function object also has a special prototype property, as discussed in the Inheritance section below.)
Object deletion is rarely used as the scripting engine will garbage collect objects that are no longer being referenced.

[edit]Inheritance

JavaScript supports inheritance hierarchies through prototyping in the manner of Self.
In the following example, the Derived class inherits from the Base class. When d is created as a Derived, the reference to the base instance of Base is copied to d.base.
Derive does not contain a value for aBaseFunction, so it is retrieved from Base when aBaseFunction is accessed. This is made clear by changing the value of base.aBaseFunction, which is reflected in the value of d.aBaseFunction.
Some implementations allow the prototype to be accessed or set explicitly using the __proto__ slot as shown below.
function Base() {
this.anOverride = function() {alert("Base::anOverride()");};

this.aBaseFunction = function() {alert("Base::aBaseFunction()");};
}

function Derived() {
this.anOverride = function() {alert("Derived::anOverride()");};
}

base = new Base();
Derived.prototype = base; // Must be before new Derived()

d = new Derived(); // Copies Derived.prototype to d instance's hidden prototype slot.

base.aBaseFunction = function() {alert("Base::aNEWBaseFunction()")}

d.anOverride(); // Derived::anOverride()
d.aBaseFunction(); // Base::aNEWBaseFunction()
alert(d.aBaseFunction == Derived.prototype.aBaseFunction); // true

alert(d.__proto__ == base); // true in Mozilla-based implementations but false in many other implementations.
The following shows clearly how references to prototypes are copied on instance creation, but that changes to a prototype can affect all instances that refer to it.
function m1() {return "One";}
function m2() {return "Two";}
function m3() {return "Three";}

function Base() {}

Base.prototype.m = m2;
bar = new Base();
alert("bar.m " + bar.m()); // bar.m Two

function Top() {this.m = m3;}
t = new Top();

foo = new Base();
Base.prototype = t;
// No effect on foo, the *reference* to t is copied.
alert("foo.m " + foo.m()); // foo.m Two

baz = new Base();
alert("baz.m " + baz.m()); // baz.m Three

t.m = m1; // Does affect baz, and any other derived classes.
alert("baz.m1 " + baz.m()); // baz.m1 One
In practice many variations of these themes are used, and it can be both powerful and confusing.

[edit]Exception handling

JavaScript includes a try ... catch ... finally exception handling statement to handle run-time errors.
The try ... catch ... finally statement catches exceptions resulting from an error or a throw statement. Its syntax is as follows:
try {
// Statements in which exceptions might be thrown
} catch(errorValue) {
// Statements that execute in the event of an exception
} finally {
// Statements that execute afterward either way
}
Initially, the statements within the try block execute. If an exception is thrown, the script’s control flow immediately transfers to the statements in the catch block, with the exception available as the error argument. Otherwise the catch block is skipped. The Catch block can throw(errorValue) if it does not want to handle a specific error.
In any case the statements in the finally block are always executed. This can be used to free resources, although memory is automatically garbage collected.
Either the catch or the finally clause may be omitted. The catch argument is required.
The Mozilla implementation allows for multiple catch statements, as an extension to the ECMAScript standard. They follow a syntax similar to that used in Java:
try { statement; }
catch (e if e == "InvalidNameException") { statement; }
catch (e if e == "InvalidIdException") { statement; }
catch (e if e == "InvalidEmailException") { statement; }
catch (e) { statement; }
In a browser, the onerror event is more commonly used to trap exceptions.
onerror = function (errorValue, url, lineNr) {...; return true;};

[edit]Native functions and methods

(Not related to web browsers.)

[edit]eval (expression)

Evaluates expression string parameter, which can include assignment statements. Variables local to functions can be referenced by the expression.
(function foo() {
var x=7;
alert("val " + eval("x+2"));
})(); // shows val 9.

7 Απριλίου 2013

storytelling-greenscreen-part-project

Filed under: STORYTELLING — admin @ 19:39
storytelling- preparing your storyboards

t
 Theartofbringingastorytolifethroughtheinflectioninonesvoice,rhythm,facialexpressions,andhandmovements.

concept- collection of texts-main themes

sound-enviroment-compostions interactions
example-stef+
character+abition+conflict+resolution

Plot Summary for-Le sang d’un poète (1932) »
A young artist draws a face at a canvas on his easel. Suddenly the mouth on the drawing comes into life and starts talking. The artist tries to wipe it away with his hand, but when he looks into the hand he finds the living mouth on his palm. He tries to wipe it off on the mouth of an unfinished statue of a young woman. The statue comes into life and tells him that the only way out of the studio is through the looking glass. The artist jumps into the mirror and comes to the Hotel of Dramatic Lunacies. He peeps through the keyholes of a series of hotel rooms. In the last room he sees desperate meetings of hermaphrodites. One of them has a signboard saying “Mortal danger”. Back in the studio the artist crushes the statue with a sledgehammer. Because of this he himself becomes a statue, located at the side of a square. Some schoolboys start a snowball fight around the statue. One of the boys is killed by a snowball. A fashionable couple start playing cards at a table beside the corpse. The woman tells the man that unless he holds the ace of hearts he is doomed. The man takes the ace of hearts from the dead boy. The child’s guardian, a black angel, appears and takes away the corpse as well as the card. Losing the ace of hearts the man shoots himself. The woman is transformed into the unfinished statue from the studio, and walks away. Written by Maths Jesperson {maths.jesperson1@comhem.se}

types-strbrd-wed-anim-schls

Filed under: Notes — admin @ 19:19

01. the walt diseny strbrd




A storyboard is a sequence of images and words drawn together on a page to form a plausible narrative.
Storyboards are routinely used in the movie making business to ‘preview’ a movie before a single shot is taken. Not only does a storyboard allow for a dress rehearsal of the final product but by the very fact of being posted on the wall,it elicits early feedback and encourages quick, painless editing, leading to significant savings in time and resources.
Disney was a storyboarding freak!
A storyboard is an apt metaphor for how we make sense of our own life history. Storyboarding can be used to sense emergent patterns in our own life story and to envision the life experiences that we wish to welcome into our future.
Try storyboarding the past and future events in your Life!

Disney
Storyboard Inventor: Walter Elias Disney

http://www.youtube-nocookie.com/embed/kgmhoQnQZNY


02. strbrd and 3d space


—- mechanical flipbook

0i8mechanical4f01131_z.jpg

Mark Rosen and Wendy Marvel, Mechanical Flipbook. Photo by Luke Neve for Kinetica

[vimeo http://www.vimeo.com/48901714 w=500&h=281]
01 HORSEINMOTION from Wendy Marvel on Vimeo.

03.strboarding interactivity

**
the origins of storyboard are in the film history , where a series of panels roughly depicts snapshots from an intented film sequence in porder to get the idea across about the eventual scene. Similarly, for inreractive system design, the storyboards provide snapshots of interface at particular points in the interaction.
Evaluating customers or user imprassions of the storyboards can determine relatively quickly if the design is heading in the right direction.

students examples-

tvscreen
-movie svreen- theatre-tv
the perception of the scale- the tv-human scale-phycological implications-being with another.
-how the action happens in z axis.
–                                                              

//// story board 1////////////P2080240

story board 1

maeda-rec-links-prog-dsgn

Filed under: Notes — admin @ 18:55

http://www.maedastudio.com/index.php

Filed under: Notes — admin @ 15:37

Architectures without Place [diaporama]


Construccions al bosc d’Olot by Josep Pujiula [1974]
As in the rest of Spain, Catalonian history is marked for the General Franco’s dictatorship from 1939 to 1975. The Franco era was characterised by repression of pro-democracy and left-wing organisations. In the middle of the repression, the post-war years led Catalonia to an economical growth which started in 1959 and, according to the Museo d’Història de Catalunya, “led [Catalonia] to major economic and social changes: foreign capital came into the country; industry diversified; tourism developed; waves of immigration from within Spain occurred; and the consumer society became established.
Within this context, it is interesting to discover some of the projects presented on the exhibition and publication Architectures without Place, which analyzes a particular vision of architectural production in Catalonia since 1968. As if we were talking about other phantom city, the aim of the exhibition was to limit the study to architectures that do not physically exist but nonetheless help us to understand the present-day reality in all its complexity. As we can read on the exhibition web-site:
The great majority are ideal projects that never got off the architect’s drawing board. Others are projects that have changed as a result of being altered or demolished, or are ephemeral architecture projects conceived for a brief existence: among these, set designs form a group apart by virtue of their specific logic and clearly differentiated conditioning factors.
There are many facts to think about, as how any dictatorship affects architecture and culture in general terms or how the economical limitations have been the seed for creativity and multidisciplinarity on those years, when architectures were proposed or imagined by creative talents from other disciplines such as film, the visual arts and especially the comic.

Modern Iconography. América Sánchez [1980]
Housing was not the exemption. While architects and artist were dreaming on a better and free world, the economic growth that started in those years has affected the architectural production, with the use of new materials and communication tools that allowed architects to know what was happening abroad in the architectural arena. Some historical facts such as the promulgation of the Stabilisation Plan [a plan to cut inflation and reduce the balance of payments] in July 1959, when the régime abandoned the despotic interventionist approach that it had maintained since 1939, had influenced the ideals of architects and creative minds that lived in Catalonia. Again from the Museo d’Història de Catalunya
This [economical] expansion took place without any type of urban planning nor the slightest degree of democratic control over the economy. Urban chaos and the lack of a basic infrastructure were common in the large cities and the tourist areas on the coast.
On those years, homes underwent major changes: New materials, such as chipboard and Formica, revolutionised furniture making. The flood of new domestic appliances continued unabated, and residents’ comfort was dramatically improved by electric fridges, washing machines, dishwashers, radios and televisions, as we can see in the following project:

Reforma apartament Stéphanie. Lluís Clotet and Òscar Tusquets [Studio PER, 1974-79]

Reforma apartament Stéphanie. Lluís Clotet and Òscar Tusquets [Studio PER, 1974-79]
After this brief historical reflection, here is a [diaporama] with some architectures proposed or imagined in which the discussion about the city is carried out from a perspective that, remote from the particular servitudes of the architecture profession, often gives it a greater lucidity.

Naus industrials Josep Ignasi Llorens and Alfons Soldevila [1980]

Infatables. Josep Ponsatí [1971]

Club de golf a Sant Cugat del Vallès. MBM Arquitectes [1970]

Carretera de les aigües. Emili Donato [1981]

City in Space. Ricardo Bofill, Taller de Arquitectura [1968]
The exhibition was designed with a non-chronological narrative of events which aimed to offer a more reflective and multifaceted reading of the content, providing us with the elements for a debate on the role of architecture and its interaction with the socio-political context. General Franco died on 20 November 1975 and the opening up of the regime led to democracy by another route, political reform. In June 1977, the first free elections since 1936 were held. This socio-political changes drives us to reflect on the paradigm of the relationship between the architect and society.
We want to finish with the thought that architecture and architectural communication has often been related with activism in the political context, using image and media as political manifestos. As Beatriz Colominatold us in an interview, “you have to think that in the decade of the 1970s, the political agenda was almost part of our architectural curriculum.” And she adds:
I think that we are facing a very interesting era, because architecture always develops in a deeper way in moments of crisis. In the decade of the 60s and 70s, we had the oil crisis, the war, and other conflicts and we had the time to think about ecology, emergency housing, new materials, the space program, etc. And now that we are living in a similar state of the world, we can discover again some similar responses and recover the principles that we have lost.
Utopias as activism and polemical reaction, keep on going. In the current years, when Barcelona is facing a “star-architect-fever” on its architectural development, Beth Galí reflects this political and economical situation in Catalonia with her project La Sagrera Família [also included in the exhibition], a paper-architecture project aimed to condemn the mediatization of a monument like Gaudi’s Sagrada Familia:

La Sagrera Família, Barcelona. Beth Galí [2000]

But is it Architecture?* | Beniamino Servino


14_08_2012

I’m an ephemeral and not too discontented citizen of a metropolis thought to be modern because all known taste has been avoided in the furnishing and exterior of houses as well as the city plan. Here you cannot point out a trace of a single monument to superstition. Morals and language are reduced to their simplest expression, in short! These millions not needing to know each other pursue their education, work, and old age so identically that the course of their lives must be several times shorter than absurd statistics allow this continent’s people. So, from my window, I see fresh spectres roaming through thick eternal fumes – our woodland shade, our summer night! – New Furies, before my cottage which is my homeland, my whole heart, since all here resembles this – Death without tears, our active daughter and servant, desperate Love and pretty Crime whimpering in the mud of the street.

Filed under: Notes — admin @ 15:30

Stop Obeying! | Resistant Checklist by Lebbeus Woods

Resist whatever seems inevitable.
.
Resist people who seem invincible.
.
Resist any idea that contains the word algorithm.
.
Resist the idea that architecture is a building.
.
Resist the idea that architecture can save the world.
.
Resist the hope that you’ll get that big job.
.
Resist buying an automobile of any kind.
.
lwblog-the-system-dwg1
.
Resist people who are satisfied.
.
Resist getting big jobs.
.
Resist taking the path of least resistance.
.
Resist the growing conviction that They are right.
.
Resist the idea that you need a client to make architecture.
.
Resist people who tell you to resist.
.
Resist writing what They wish you would write.
.
Resist assuming that the locus of power is elsewhere.
.
Resist any idea that equates architecture and ownership.
.
Resist the thought that life is simple, after all.

STORYBOARD

Filed under: Notes — admin @ 15:15
http://www.hiroadproductions.com/

Filed under: Notes — admin @ 15:12

TYPES OF CONTENT
1. Documentary; provides documentary information on an existing person or object
2. Narrative: fictitious depiction, like live theater except is recorded; has a narrative element, story
3. Advertisement: commercial tools used to promote or sell a product, service or point of view
4. Experimental: works which do not fit into the above categories

IMAGE SOURCES FOR MOVING IMAGERY
1. video imagery; recorded with video camera
2. film: imagery: recorded with film
3. 2D animation: created with traditional or computerized techniques
4. 3D animation: created with 3D animation software
5. video processed: video imagery modified using hardware or software
6. still images: scanned or shot with a camera

ORIGINS OF CONTENT
a. personal experience
b. based on a belief system or concept(eg. Catholicism or Capitalism)
c. based on a book or writing
d. based on current events
e. the imagination

UNFOLDING CONTENT OVER TIME

present

past future

Consciously or unconsciously, the viewer will attempt to answer the following questions:

1. What’s happening here?
2. What has been happening?
3. What might happen?

KEEPING THE VIEWER INTERESTED

If content an action within the finished work is presented in an expected or cliche manner, viewers will probably become bored. No one type of content will be of inters! to all viewers, must consideridentity of the viewer.

Methods of keeping interest:

a. present new content of interest to the viewer eg. create a documentary about a publicaly available vehicle which could transport anyone to the moon at a cost of $99.95

b. present popular content, but from a new perspective eg. create a documentary about the disadvantages of a computerized society

c. present action is unexpected (example: in the film “M. Butterfly” the viewer
and male lover learns at the end of the film that thebeautiful actress is a man”)

d. recomprehension of the past example2: in the film “The Adjuster (1991)” by Atom Egoyan, an attractive well dressed woman sits beside a large, dirty, supposedly homeless man on a subway car.  To the shock of the other passengers, the woman begins to rub crotch area of the man. At the next stop, the man and woman run off the train, followed by them laughing as they run onto the. They are a man and wife who enjoy exhibitionism.

example 3: In “Exotica(1994),1′ also by Egoyan, viewers follow the life of a customs agent whooften visits a strip club where he always requests a dance from a specific young woman. Late in the film, the viewer learns the young woman had been the baby sitter for the man’s young daughter who had been murdered a few years earlier. His encounters with the woman oscillate between sensuality and nostalgia and human comfort.

OVERALL STRUCTURE
storyboarding: series of small drawings indicating keyframes, sequences, transitions, etc.

frame: single frame making of a shot

———————————————————————————————————–
shot: collection of related frames

shot-synthesis-lighting
——————————————————————————————————————–
sequence: a collection of shots related formally or conceptually

complete video/film/animation: consists of frames, shots and sequences

transitions: cinematic effects between sequences or shots

key frames: two extremes of a particular movement

inbetweening: calculation of frames in between key frames

MOVING IMAGERY NOTES
September 7, 1998

Filed under: Notes — admin @ 14:57

Friday, June 11, 2010

Reproduced Form/Form Reproduction

Under what circumstances can a work of art be reproduced?  Here, a series of historical examples and judicial opinions involving the copyrighting and patenting of steel tube cantilevered chair designs provide some guidance.  These cases demonstrate a conceptual wordplay of sorts.  Whereas some deal with issues of reproduced form, the others concern form reproduction.  Or, put another way, whereas the former is an investigation into form, the latter is an examination of process.

However, no discussion invoking the term “reproduction” can begin in earnest without at least a brief mention of Walter Benjamin’s seminal and oft-quoted essay, “Das Kunstwerk im Zeitalter seiner technischen Reproduzierbarkeit” (“The Work of Art in the Age of Its Technological Reproducibility”) (1939).[1]   The much-lamented loss of the aura, defined as the “formulation of the cult value of the work of art in categories of spatiotemporal perception,”[2] is of little use here.  Yet Benjamin’s essay reveals additional insights concerning an original work of art and its copy.  Beginning with the dictum that all art is in essence reproducible, Benjamin distinguishes between manual reproduction and mechanical reproduction, noting, “Confronted with its manual reproduction, which was usually branded as a forgery, the original preserved all its authority; not so vis a vis technical reproduction.”[3]   This type of reproduction has two aspects.  First, it is a process that is “more independent of the original than is manual reproduction.”[4]   Second, “technological reproduction can place the copy of the original in situations which the original itself cannot attain.”[5]   Here, Benjamin is perhaps inviting us to make further distinctions between the processes of technological reproducibility and the objects of such processes.

(Top) Marcel Breuer, Model B3 “Wassily” Chair; (Bottom) Völkisch dining room from Gretsch, Planung und Aufbau im Osten (1941) (Source: Michael Thad Allen, “Modernity, the Holocaust, and Machines without History” [2001])
To further delve into this distinction, a contemporary understanding of the problems surrounding issues of mechanical reproduction are in order.  A series of images will provide some initial guidance.  In “Modernity, the Holocaust, and Machines without History” (2001), historian Michael Thad Allen features a series of images that, when viewed together, reveal more of a polemic than an editorial decision.  One is a picture of one of Hungarian architect Marcel Breuer’s most recognized chair designs—the Model B3 or “Wassily.”  Culled from the Bauhaus Archiv, this is a familiar object, a complicated skein of pressed leather stretched tautly across a polished steel-tube frame.  When set against the light background, it looks as if the chair were suspended in midair. The image stands in stark contrast to another image, a sketch of a völkisch kitchen from Diploma Engineer Hermann Gretsch’s Planung und Aufbau im Osten (Deutsche Landbuchhandlung, 1941).  Here, atop wooden parquet, a phalanx of wooden chairs surrounds a large, flat maple-hewn table.  The drawing, from an omniscient birds-eye view, reveals a series of wall-hangings, each featuring a deity or character from Der Nibelungen or any other Nordic phantasie.  The image depicts a comfortable setting, and yet suggests a more complicated set of values.
Diploma Engineer Gretsch was an advisor to Deutsche Edelmöbel (German Nobel Furniture), the SS’s venture into furniture and industrial design.  Towing the party line and vehemently opposed to what he envisioned as modernism’s slavish aping of capitalistic styles, Gretsch was a tireless advocate of a design ideology he called “Agrarian Objectivity.”  A “’timeless’ aesthetic located in an imagined epoch before capitalist spoliation,” Agrarian Objectivity was a “direct attack upon left-leaning artistic movements associated with ‘New Objectvity’ [Neue Sachlichkeit].”[6]    Here was a design concept that made no effort to conceal its political orientation and that placed an unmistakable priority on production.  Allen therefore remarks on what he labels as productivism:

Production was to manufacture the German spirit, a spirit forged as the maker rather than the consumer of goods.  At the heart of Nazi modernity was the dream of a perfect system […] But it was to be a system whose overarching output was supposed to be culture – the New Order of National Socialism.[7] 

For Gretsch, Agrarian Objectivity ensured that its material artifacts became emblems of German race and values.[8]   Gretsch famously declared: “Race, heritage, tradition, and lifestyle are important, but designers completely forgot them.  They have forgotten that they must also satisfy cultural needs.”[9] 
Agrarian Objectivity was not only a manifestation of Nazi ideology, but as a theory of industrial production, it placed great emphasis on the creation of artifacts.  If a wooden stool was superior to a cantilevered chair in that it suited the German spirit, it was only because woodworking, and not the wooden stool, fueled the imprimaturs of productivism.  To suggest that Agrarian Objectivity paid no attention to form may be too simplistic, however.  The form and look of a heimat or Biedemeier furniture set is as important as the industrial techniques used to produce them.[10] 
Breuer’s writings provide another example of how a form versus process dichotomy begins to take shape.  Consider Breuer’s own meditation on form and its relation to the modern movement in an article titled “Metallmöbel und moderne Räumlichkeit” (“Metal Furniture and Modern Spatiality”) (1928).  Here, Breuer notes:

Since the external world affects us today with the most intense and various impressions, we change the form of our lives in more rapid succession than in earlier times.  It is only logical that our surroundings must undergo corresponding changes.  We are approaching furnishings, spaces, and buildings which, to the greatest possible extent, are alterable, mobile, and accessible to various combinations.  Furniture, even the walls of the space, are no longer massive, monumental, apparently permanently rooted, or in fact permanently installed.  They are much more injected with air, drawn, so to speak, in space; it hinders neither movement nor the view through space.  The space is not longer a composition, no rounded-off whole, since after all its dimensions and elements are subject to essential changes.  One comes to the conclusion that any correct, usable object fits in the space in which it is needed, similar to how a living being fits in nature: a person or a flower.  The reproductions show metal furniture of the same characteristic form, determined by the type of design, in the most various spaces: in the theater, auditorium, atelier, dining room, and living room.[11]

Granted, for the proponent of Agrarian Objectivity, as well as for the avatar of Neue Sachlichkeit, technological reproducibility (or technical reproduction) was an inescapable condition of contemporary society.  Benjamin does not devote much time to finessing any distinction between form and process—one can only speculate as to any importance he would have assigned to this issue.  This distinction between form and process nevertheless becomes important especially when considering issues of copying.  For a further examination of how Weimar-era and Nazi authorities dealt with issues of form and process, this analysis once again looks to the manufacturing of chairs in Germany prior to World War II.  An excellent and influential article by historian Otakar Máčel involving legal claims surrounding the manufacturing of tubular steel chairs is indispensable.  In “Avant-Garde Design and the Law: Litigation over the Cantilever Chair” (1990), Máčel outlines two lawsuits of paramount importance: the first, involving a 1929 claim by Hungarian furniture impresario Anton Lorenz against the international furniture company Gebrüder Thonet Aktiengesellschaft (AG) (“Thonet”); the second, a claim by Mauser Kommanditgesellschaft (KG) against Ludwig Mies van der Rohe from 1936.

Mart Stam, drawing of first cantilever chair (1927) (Source: Otakar Máčel, “Avant-Garde Design and the Law: Litigation over the Cantilever Chair,” Journal of Design History Vol. 3, No.2/3 [1990])
Reproduction of Stam’s 1926 cantilever chair (Source: Máčel)

Stam, tubular steel chair licensed to L.&C. Arnold (1927) (Source: Máčel)

Although the facts underlying these cases are complex, the origins of the claims can be traced to the 1927 Werkbund exhibition in Stuttgart.  There, Dutch designer Mart Stam sketched his concept for a cantilevered chair on the back of a wedding invitation at the Hotel Marquart. Stuttgart was a fertile environment for other European designers and avatars of modernism.  The Werkbund exhibition itself provided an ideal forum where designers could market and license their creations.  Stam was no exception, for shortly after he modified his chair design, which consisted of gas pipes arranged in the “continuous line” typifying cantilevered design, Stam licensed this design to the iron works of L.&C. Arnold in nearby Schorndorf.  Unknown to Stam, and in an event that would be significant over a decade later, in 1923, a metalworker named Gerhard Stüttgen designed a steel-tube chair that did not use legs for its back supports for his students at the Köln Kunstgewerbeschule.[12] 

Around the same time that Mart Stam completed his chair designs, both Marcel Breuer and Ludwig Mies van der Rohe also completed designs for steel tube furniture.  In 1926, Breuer designed a series of stools and tables that utilized the principle of the cantilever chair.  Breuer recalls a conversation he had with Stam in 1926 or 1927 regarding the cantilevered chairs:

I explained [to Stam] that I was working with a craftsman in Dessau and I would like to introduce a heavier tubular section to do a heavier cantilever chair.  He went home and drew it up this chair.  He somehow got legal protection.  But he did it in solid pipe […] I mentioned to him my stool […] that if you turn it on its side it is a cantilever chair.  But the tubing was not thick enough; I needed 25mm tube.  I did it myself; turned it over.[13] 

Breuer and Mies van der Rohe featured their designs at the Werkbund exhibition.  Unlike Stam’s and Breuer’s decidedly angular designs, Mies’ chair featured the well-known curved and continuous profile.
In Berlin, Marcel Breuer’s own company, Standard-Möbel Lengyel & Co., became the licensee for all of the designer’s furniture.  The company was not successful at first, and 1928, Breuer and business partner Kalman Lengyel hired Anton Lorenz, a successful Hungarian entrepreneur, to run the company.[14]   Although Breuer entrusted Lorenz with the future of the furniture venture, a sudden instance of pragmatism inspired him to license the rest of his tubular steel furniture designs to Thonet in July 1928.  This eventually created a situation where two separate companies—Standard Möbel and Thonet—were manufacturing Breuer’s chair designs.[15]

Breuer, tubular steel chair (1928-9).  This is Breuer’s version of Stam’s chair—also known as the Thonet B33, and the inspiration for the Standard-Möbel L33 (Source: Máčel)
DESTA ST-12 tubular steel chair (1929) (variant of Stam’s chair, similar to Standard-Möbel  L33) (Source: Máčel)
Breuer, tubular steel chair (1929) (first version of the Thonet B34 chair) (Source: Máčel)
Anton Lorenz, DESTA SS32 chair (1929), based on Breuer’s design? Or Stam’s? (Source: Máčel)
A series of events further complicated legal matters in 1929.  On April 11 of that year, Thonet bought most of Standard-Möbel’s interests.  This transaction excluded Standard-Möbel’s own factory on the Teltowerstrasse in Berlin, and as a result that part of the company was not only able to keep the company name, but kept Lorenz as the firm’s only officer.  Included in Standard-Möbel’s sale was the transfer of all Breuer’s designs to Thonet.  But in an inexplicable instance of major legal oversight, Standard-Möbel’s L33 and L34 chairs were not included in the rights transfer.  Standard-Möbel refused to assign the rights to these chairs to Thonet (ostensibly because these designs were to be manufactured at the Teltowerstrasse factory).  A letter signed by Standard-Möbel’s lawyers on June 18, 1929 thus explains:

Your particular request to hand over to you models L33 and L34 cannot be complied with, as these models are patented and copyrighted by our Mr. Lorenz who does not intend to transfer these rights to you.  There is no doubt whatsoever that these pieces had been assembled from your materials and in your working-time; our Mr. Lorenz will be pleased to receive your invoice for assemble and labour, upon receipt of which he will reimburse you in cash.[16] 

Thonet nevertheless continued to produce the chairs, and Lorenz filed a suit against the furniture maker in July 1929.  Standard-Möbel’s officer, however, arranged for other legal maneuverings securing the ability to own the rights to all cantilevered furniture.  Not only did Lorenz enter into a separate contract with Mart Stam to purchase all the designer’s rights to cantilevered designs, but Lorenz also formed another company in September 1929, Deutsche Stahlmöbel (DESTA).  DESTA manufactured the L33 and L34 chairs (ST12 and SS32 respectively), as well as furniture concepts by other well-known designers.
The ensuing legal opinions interpreted Lorenz’ claim as a question of authorship.  Lorenz’ attorneys sought an injunction to prevent Thonet from manufacturing the Breuer chairs, claiming that the designs were originally authored by Stam.  The civil division of the Landesgericht Berlin found in favor of Lorenz.  Thonet appealed to the federal Reichsgericht and subsequently lost that decision on June 1, 1932.  That court specifically asked whether the Stam chair was “an object of arts and crafts or a technical innovation,”[17] an important issue because only the former could receive copyright protection.[18]   Thonet maintained that the chair was the result of a technical process.[19]   In disagreeing, the judges concluded:

The basic feature of Stam’s chair resides in the austere and strident movement of line; avoiding all superfluous parts it embodies modern objectivity in a sparse form derived by the simplest of means.  Whether or not its formal aspects are also technically inspired is irrelevant to the question of its artistic quality.[20] 

Thonet also argued that the quality of its chair was better than that of Standard-Möbel’s.[21]   This difference in quality was raised in order to reaffirm the idea that Stam’s chair was a product of technical innovation, not artistic design.  The court, however, saw the issue differently.  The reproduction of Stam’s form was actionable—Thonet was therefore in copyright violation.  In noting that the chairs “so closely resemble one another that no essential features can be found to differentiate them,”[22]  the court basically emphasized that the Thonet chair was a replica of the Standard-Möbel chair.  In other words, in declaring Breuer’s chairs were replicas of Stam’s, the court came to the unbelievable conclusion that Thonet was in reality producing Stam’s chairs.
If Lorenz’ case against Thonet emphasized the mechanical reproduction of an object’s form, then what types of legal criteria can be used to describe the process of reproduction? Here, a case by Mauser KG against Mies van der Rohe becomes of special importance.  On the heels of the Werkbund exhibition, Mies filed patent DRP 467 242 on August 24, 1927 covering the manufacturing processes for a series of steel tube chairs.  The “salient features” of this patent included: “the use of cold-drawn bent steel tube; sufficient springiness (or resilience) for comfort; and, as far as the form is concerned, a chair – in which the seat frame and its support are made out of a single piece of resilient curved steel tube … [t]his tube is bent in a semi-circle and forms a continuous line form the supporting part to the seat and the back.”[23]   In 1936, the outspoken architect made public statements that both L.&C. Arnold and Mauser KG were violating his patents.  Later that year, Mauser sued to invalidate Mies’ patents.

Ludwig Mies van der Rohe, tubular steel chair manufactured by Berliner Metallgewerbe J. Müller (1927).  According to Máčel, this chair was later manufactured by Bamberg Metallwerkstätte in 1931 and Thonet in 1932.
 Gerhard Stüttgen, tubular steel chair (1923) (Source: Máčel)
Mies’ attorneys mounted a defense based on two criteria.  First, Mies contended that several of Mauser’s chairs, though not sharing any formal characteristics with his designs, nevertheless violated his patent.  However it is the second criterion of Mies’ defense that deserves special mention.  Here, Mies’ attorneys asserted that by the time the patent was filed in 1927, several furniture producers were already employing similar manufacturing techniques.  The idea here, of course, was that Mies was the first to develop and exploit these processes.  In an unexpected development, Mies patent attorneys used Stam’s chairs “as proof of the contemporary existence of designs embodying the characteristics patented” by Mies.[24]   At the time, Mauser had just obtained the rights to Stüttgen’s previously-mentioned chair designs, and introduced evidence that it was he, and not Mies, that had pioneered the manufacturing process.  Yet bad lawyering hampered Mauser’s case—Stüttgen was forced to admit that when he was developing his own manufacturing processes, he did not believe that they would be able to manufacture any useable furniture designs.  Mauser responded by claiming that Mies had knowledge of Stam’s designs (thereby claiming once again that the patent was invalid).  Yet the court determined that Mies filed his patent three days before the Werkbund exhibit even begin, thus invalidating any claim that Mies had prior knowledge of this process.[25]   The Kammergericht (Supreme Court) decided in Mies’ favor in 1937, and awarded Mies previously-owed compensation.  These decisions, as opposed to the Lorenz-Thonet cases, demonstrate that in matters of mechanical reproduction, form is indeed subordinated to technical inventions, materials, and construction.
____________________

Filed under: Notes — admin @ 14:56

Monday, June 14, 2010

Two-Dimensional Realism

Photograph of Mordecai Gorelik’s stage design for Charles Bickford’s stage adaptation of Carl Sandburg’s Casey Jones (Source: “A Locomotive Steals the Show: ‘No.4’ Is Hero of Dramatized ‘Casey Jones'” Life (Mar. 14, 1938), p. 41.) 

“The white surface descends and the events of the three dimensional stage imperceptibly blend into two-dimensional illusions.”[1]  And so the German sociologist and film critic Sigfried Kracauer describes that moment just after the orchestra stops playing and right before the projectionist screens a film on the movie screen.  Here, it is as if the lowering of the movie screen saves the audience from the orchestra’s musical assault.   And yet Kracauer’s description of film as “two-dimensional illusions” presents something of a problem.  This is because cinematic set design—a broad term describing the various constructions and decorations used to evoke a film’s concepts and ideas—is also about presenting and conjuring the illusion of three dimensions.  Movies and stage plays both rely and capitalize on the audience’s ability to see things in three-dimensional space.  But the ability to manipulate two-dimensional objects to make them appear as three-dimensional objects is also an important aspect of set design.  This manipulation also had political dimensions.

In a 1947 issue of Hollywood Quarterly, a craft-oriented journal covering the film industry, veteran stage designer Mordecai Gorelik issued a vituperative rant against RKO studio management.  “In some ways the Hollywood treatment of settings cases a revealing sidelight on the general Hollywood approach to reality,” Gorelik writes.[2]   Reminding the reader that a film set is first and foremost a “human environment” and a “highly important, if mute, aspect of the screen story,” Gorelik continues: “What happens to this part of life on its way through the camera lens?  As a Broadway designer who has also worked in pictures (as film production designer), I am bound to report that any attempt to bring reality to movie settings encounters stern resistance on the big lots.”[3]

Concept Drawing by Mordecai Gorelik for None But the Lonely Heart (RKO, 1944) Image: Gorelik (1947)

To prove his point that Hollywood producers did not value realism in set design, Gorelik recounted his experiences as a production designer for several RKO films.  He refers to the the original production designs and art department sketches of street scenes from Clifford Odets’ None but the Lonely Heart (1944) as  “cliché” designs executed by a “Prix de Rome type” who was eventually fired.[4]   Odets would eventually hire Gorelik, who then remade the street scene into a “typical example of rattletrap slum housing.”[5]   This was a shabby aesthetic that Gorelik would perfect for other films as well.  Thus for a British production at Ealing Studios, he designed a dark, squat antique store that called attention to “the pathetic smallness and the sordid poverty of the things on sale.”[6]

Gorelik’s concept sketch for an antique store, Ealing Studios, London. Image: Gorelik (1947)

Gorelik felt that his designs were openly antagonized.  For Jacques Tourneur’s Eastern Front drama, Days of Glory(1944), another RKO production, Gorelik designed a guerilla encampment made to resemble something that impoverished yet redoubtable Red Army cheloveks would mount in anticipation of a Nazi siege.  Gorelik recounts RKO’s set design philosophy at the time:

The RKO method was to do a perfect carpentry job with dressed lumber from the studio stockpile and then chop up the result with axes and chisels in order to denote rude construction […] It was my painful duty to interrupt this process and have the stairway built of logs, saplings, charred timber, old doors, and other material that any reasonable person would consider more available under the conditions of the story.[7] 

Gorelik felt that he was correcting instances of what he labeled “Belasco Naturalism,”[8] a form of “literal reproduction” that amounted to nothing but a “superficial ‘snapshot’ technique without selectivity, style, or dramatic content.”[9]   Gorelik understood that realism could not be achieved “by the literal reproduction of anything”, and thus he advocated a type of documentary quality, an American variant on neorealism’s imprimatur of showing “characters of great humanity caught up in everyday life” in a rich mix of cinematography, writing, and direction that created a cinema based on “the material signs of everyday existence, on the inherent qualities of place, on autobiography, on authentic sentiment.”[10]   This, too, was met with resistance from the studio.  Gorelik continues describing his art director’s heartaches on the set of Days of Glory:

The same picture called for a peasant cart made of crude lumber.  I found just the right material for it on a nearby ranch – rough boards that had lain for years in the open.  The cart was built at the ranch and was brought to the studio.  Next day I saw it in one of the studio alleys.  It had been painted a fine, spanking battleship gray all over; all texture was gone, and you couldn’t tell the wood from the metal parts.  It became necessary to repaint the cart with artificial wood graining in an effort to restore some of its original appearance.[11] 

Such anger and disappointment could perhaps be explained by the fact that Gorelik was one of the foremost stage designers in left-wing and radical theater groups during the 1930s. During that time, New Deal legislation initiated many programs in art stewardship, and theatre groups in American large cities took the initiative and started companies that specialized in the production of “social plays” that responded to the economic, social, and political woes spurred by the Great Depression.  In 1935, Gorelik was a member of the Theatre Union, the most well-known Socialist theater outfit of the era. The Union’s organizers were well-versed in contemporary theater trends, and although they were familiar with a poorly-received 1925 New York production of Bertolt Brecht’s The Threepenny Opera, they did not know much about the playwright’s other dramatic works.  Brecht was disliked among other theatre circles, but he also became famous for his film Kuhle Wampe (1932), a piece of anti-fascist agitprop, and along with Kurt Weill, was identified as part of a new generation of anti-Nazi “revolutionary figures.”  Also, by 1935, the once-maligned production of The Threepenny Operawas beginning to be viewed as a critical success.  Through Friedrich Wolf, director of the Theatre Union, and Benno Schneider, artistic director of the Yiddish left-wing theater group ARTEF, the Union arranged for Brecht’s arrival in the United States.  The two were familiar with Brecht’s most recent play, Die Mutter (The Mother) (1935), the playwright’s ambitious adaptation of the Maxim Gorki novel of the same name, and were busy securing rights and financing to produce the first English-language performance of this play.  Like many other German intellectuals of his generation, Brecht was in exile, seeking solace and protection from the burgeoning rise of Nazism in Germany.  Finally, in 1935, Brecht stole away on a worm-ridden dingy from Denmark to New York.  Upon landing, Brecht immediately contacted Wolf and Schneider, ready to begin work on the American production of The Mother.

Brecht and the Theatre Union did not have an easy relationship.  At first, the production was marred by financial hiccups and major disagreements between Brecht and the show’s producers.  However, the relationship between Brecht and Gorelik was a different matter.  The two became close friends as collaborators.  Gorelik was a devotee of Brecht’s and admired the playwright’s ideas for the set and production design.[12]   When The Mother finally opened on 19 November 1939, the production featured many of the performative elements, such as projection screens, visible lighting apparatuses, and audience-actor participations, commonplace to Brecht’s Lehrstücke, or teaching plays.[13]   There was a small budget for set design for The Mother, but Gorelik nevertheless created a “small revolving stage partitioned through the center” that stood “just under a projection screen.”[14]   Gorelik continues describing his design: “At stage right were two grand pianos.  The stage was illuminated by a row of visible spotlights … The projection screen was in constant use as an editorial commentary.”[15]

Mordecai Gorelik’s stage design for Brecht’s The Mother (1935). Image: Baxandall (1967).

Gorelik’s anti-naturalist sentiments can also be traced to his work with Brecht on The Mother.  Brecht notes that American productions (presumably still under the sway of Belasco’s techniques) utilized a form of naturalism that did not serve the revolutionary potentials of theatre.  Brecht continues:

Naturalism has a revolutionary aspect, for it shows the social conditions which the bourgeois theatre takes great pains to conceal.  Also, a call to fight is sounded, which proves that the fighters exist.  But only in a second phase does proletarian theatre begin, politically and artistically, to qualify itself for it social function.  The first phase shows that the class struggle does exist.  The second shows how it ought to be conducted.[16]

The professional relationship with Brecht was also productive in other ways, for it was during this time that Gorelik was able to formulate his ideas for New Theatres for Old (1940), a book-length exegesis on this history of stage and set design and the first written treatise of the notion of “Epic Theater.”

Epic Theater was a kind of experimental dramatic production that featured “a non-illusory style that was designed to impart an explicit socio-political message through the intentional destruction of theatrical verisimilitude.”[17]   At first, this notion may seem paradoxical, but the main idea behind Epic Theater (as with Brecht’s Lehrstücke) was to break down any type of slavish naturalism, unnecessary photorealism, or—to use Gorelik’s own language—literalism that would impede or dilute the essence, or “scenic gestus” of the production.  On the heels of The Mother, productions like Erwin Piscator’s and Lena Goldschmidt’s The Case of Clyde Griffiths (1936) (a stage adaptation of Theodore Dreiser’s An American Tragedy), Paul Green’s Johnny Johnson (1936), George Sklar’s Life and Death of an American (1939), and Marc Blitzstein’s The Cradle Will Rock (1937), used agitprop elements such as “direct appeals to audiences, choral effects, political slogans, non-illusory setting and staging, episodic structure, type characters”[18]  to deliver a clarified message to the audience.

Gorelik believed that Epic Theatre was the latest and most important event in the evolution of the dramatic arts, a position he vehemently upheld in his New Theatres for Old.  In that book, Gorelik looked to the prehistory of Epic Theatre—Renaissance and Baroque drama—and identified two strains of set and stage design: the conventional and the illusory.  Illusory stage design was in essence a form of symbolism, a form of “attenuated naturalism” that suspended critical judgment and operated under a directive “according to which the environment was reduced to atmosphere, to ‘dreamlike mists,’ [whose] only function of was to create a powerful emotional impression on the beholder.”[19]

Gorelik, on the other hand, characterized Epic Theater as a type of conventional theater.  Finally, here was a type of theatre that “organized experience into a rational structure” whereby each performance was transformed into an “impartial” forum where “facts were introduced, hypotheses were investigated, and fallacies were exposed.”[20]   Epic Theater relied upon the “objective logic of events” by applying principles of scientific Marxism to bring to drama “the experimental, unprejudiced and precise method of the scientific laboratory.”[21]   For Gorelik, the stage presented an opportunity to bring to light “the temporal affairs of the socio-economic world” and to provide “an instrument for the transvaluation of political consciousness … a means of promoting social change.”[22]   Gorelik did believe, however, that the principles of Epic Theater could be applied to the screen as well:

No Epic play or film can hope to present facts which will not be questioned, no matter how well supported the evidence may be.  What is significant is the tendency to rely upon facts, to rely upon the objective logic of events rather than upon subjective emotion.[23] 

But in his 1947 piece for Hollywood Quarterly, Gorelik seems to have made an about-face.  “What of the more subtle use of setting in achieving the style or dramatic content?”[24]  he asks.  Gorelik thus describes another design challenge on the set of None But the Lonely Heart:

For the back alley of the Fun Fair in Lonely Heart the art factory offered a piece of prosaic naturalism, without regard to the fact that this alley was one of the most romantic locales in the story.  Again I was obliged to redesign, curving the walls of the alley, arching it with trees, placing shadowy hoods over doors and windows.  This shift towards a more poetic imagery was meaningless to the art regime.[25] 

Perhaps Gorelik’s invocation of curved forms and manipulated shadows is a veiled reference to Hans Poelzig’s architecture and film set designs.  Yet Gorelik’s fluctuations between realism and “poetic imagery” suggests how this landmark figure was trying desperately to be employed by the “Hollywood Art Machinery” that seemed all too eager to reject him.

This is not to say that global concerns made issues of theatrical realism totally irrelevant.  In 1943, just before Gorelik was working for Odets and Tourneur,  RKO’s “authenticity division” deployed several employees to assist the U.S. Army’s Chemical Warfare Service in building and designing the interiors for the “Typical German and Japanese Test Structures” at Utah’s Dugway Proving Ground.  Acting on information about wood construction techniques and architectural design in Germany and Japan provided by Erich Mendelsohn, Konrad Wachsmann, and Antonin Raymond, the RKO group was only one example of how entertainment and military interests conjoined in service of the war effort.  Gorelik was no exception.  He took up an additional job directing radio plays for the Office of War Information while working as a set designer.  During this time, in 1944, he also began a stint at Douglas Aircraft producing exploded axonometric drawings of airplanes.[26]  And after the war ended, he became a film instructor at a special university for discharged G.I.’s in Biarritz.

Mordecai Gorelik holding a maquette of his stage design for Casey Jones (Source: “A Locomotive Steals the Show: ‘No.4’ Is Hero of Dramatized ‘Casey Jones'” Life (Mar. 14, 1938), p. 42.)

Gorelik was fairly well-known.  So was his struggle against what he would call “Belasco Naturalism.”  Such issues of naturalism versus realism on stage are best encapsulated by a review in Life of Charles Bickford’s 1938 stage adaptation of Casey Jones.  The reviewer describes the centerpiece of the stage design: a giant replica locomotive designed by Gorelik (see image at the very top of this post):

It is made of lath, covered with black velours.  Its fire is a red spotlight.  Its steam is real steam blown by a fan.  Its bell is a sound taken on the New York Central Line.  Its sway is produced by two stagehands operating levers on either end.  Its cost was 81,500.[27]  

Most of the review features images of Gorelik’s stage design.  And in one instance, a small photograph shows the designer himself, holding a small scale model of the “No.4” locomotive, giving the reader a sense of how a three-dimensional object has been flattened to become more of a two-dimensional one.  The review ends with a poignant jab: “Casey Jones, its locomotive aside, is not a good play but it has the makings of a superb movie.”[28]

__________________________

Notes


[1] Siegfried Kracauer, “Cult of Distraction: On Berlin’s Picture Palaces” Thomas Y. Levin trans. New German Critique No. 40 (Winter, 1987): 91-92.
[2] Mordecai Gorelik, “Hollywood’s Art Machinery,” Hollywood Quarterly Vol. 2, No. 2 (Jan., 1947): 153.
[3] Ibid.
[4] Odets declared of this set design: “This place is so pretty that I’d like to live in it myself.  What I want for my action is not a relic of the good old days, but a relic of the bad old days.  This street must be the villain of the story; it is the sinister primary reason for the whole dramatic chain of events.” Ibid.,p.155.
[5] Ibid.
[6] Ibid., p. 156.
[7] Ibid., p. 157.
[8] Named after David Belasco (1853-1931), the influential set designer and dramaturge recognized for bringing a new type of naturalism to American stages in the early 20th century.  His techniques emphasized natural lighting and often attempted to create a realistic stage atmosphere.  Belasco famously declared “it is much easier to appeal to the hearts of audiences through their senses rather than through their intellects.” Lise-Lone Marker, David Belasco: Naturalism in the American Theatre, Review Author: Thomas F. Marshall, American Literature Vol. 47, No. 3 (Nov. 1975): 454-455.
[9] Gorelik, “Hollywood’s Art Machinery,” p.157.
[10] Maristella Casciato, “Neorealism in Italian Architecture” in Sarah Williams Goldhagen and Réjean Legualt, eds. Anxious Modernisms: Experimentation in Postwar Architectural Culture (Cambridge: MIT, 2000): 25-26.
[11] Gorelik, “Hollywood’s Art Machinery,” p. 157.
[12] Set design for The Mother had always been a divisive issue.  According to Theatre Union member George Sklar: “[T]he use of ‘das kleines Brecht Vorhang,’ the seven-foot –high burlap curtain strung on a wire and pulled by hand to close it.  We saw no sense in this curtain.  The Civic Repertory Theatre had two balconies.  The audience in the orchestra couldn’t see what was happening behind the seven-foot curtain when it was closed, but the audiences in the two balconies looked down over it and could!  Why?  We never did find out from him.  Gorelik  … fought with him about it for a couple of weeks, then discovered the brilliance of ‘epic theatre’ and became a Brecht disciple.” Lee Baxandall, “Brecht in America: 1935” TDR (1967-1968) Vol.12, No. 1 (Autumn, 1967): 78.
[13] See Anne Fletcher, “The Gestus of Scene Design: Mordecai Gorelik and the Theatre Union’s Production of Brecht’s The Mother”Theatre History Studies, Vol. 23 (2003).
[14] Baxandall, “Brecht in America: 1935”, p.78.
[15] Gorelik, New Theatres for Old (New York: Samuel French, 1940): 396 quoted in Ibid.
[16] Baxandall, “Brecht in America: 1935”, p. 84.
[17] Ira Alan Levine, Theatre in Revolt: Left-Wing Dramatic Theory in the United States (1911-1939) PhD dissertation, University of Toronto (1980): 227.
[18] Ibid., p. 228.
[19] Gorelik, New Theatres for Old, p.263 quoted in Ibid., p.241.
[20] Ibid., p. 244.
[21] Ibid.
[22] Ibid., p. 295.
[23] Gorelik, New Theatres for Old, p.435-436 quoted in Ibid., p.282.
[24] Gorelik, “Hollywood’s Art Machinery,” p.158.
[25] Ibid
[26] Fletcher, Rediscovering Mordecai Gorelik: Scene Design and the American Theatre (Carbondale, Illinois: Southern Illinois University Press, 2009), p.166.
[27] “A Locomotive Steals the Show: ‘No.4’ Is Hero of Dramatized ‘Casey Jones'” Life (Mar. 14, 1938), p. 41.
[28] Ibid.

« Newer PostsOlder Posts »

Powered by WordPress

error: Content is protected !!