xxxxxxxxxx
374
//Take screenshots of different areas of the world and import them into P5
// Trace them in illustrator first?
// Implement rule sets for outlining, path drawing etc. to draw over the individual maps
//Find a way to generate a pdf and save it
// Use plotter?
//Look into different structures of introducing the city - different branches for sentences structure, ex: p49
//'Generated Cities' is a computational interpretation of the book 'Invisible Cities' (Italo Calvino), by Chloé Desaulles. After having analyzed the story structure, a program was written to mimic Calvino's storytelling and generate an infinity of new tales. Each written story is additionally accompanied by a generative map, acting as a visual aid and filler for written language.
// This project was programmed using Tracery.js, thank you Kate Compton!
let f;
let fb;
function preload(){
f = loadFont('Inconsolata-Regular.ttf');
fb = loadFont('Inconsolata-Bold.ttf');
}
function setup() {
createCanvas(1000, 800);
background(255);
}
function draw() {
textFont(f, 20);
textSize(14);
line(width/2, 0, width/2, height);
//text("Generated Cities", 20, 20, width-40,40);
}
function mousePressed() {
background(255);
push();
var grammarTitle = tracery.createGrammar(titleSource);
grammarTitle.addModifiers(tracery.baseEngModifiers);
var output2 = grammarTitle.flatten("#title#");
background(255);
textFont(fb, 20);
textSize(30);
textAlign(RIGHT);
text(output2, 20, 20, 455, height-10);
pop();
var grammar = tracery.createGrammar(grammarSource);
grammar.addModifiers(tracery.baseEngModifiers);
var output = grammar.flatten("#city#");
text(output, 20, 120, 420, height-10);
}
var titleSource = {
"title": "#description#",
"description": [
"Cities & Memory", "Cities & Desire", "Cities & Signs", "Thin Cities", "Trading Cities", "Cities & Eyes", "Cities & Names", "Cities & the Dead", "Cities & the Sky", "Continuous Cities", "Hidden Cities","Cities & Language", "Cities & Regret", "Cities & Time", "Waiting Cities"
]
}
var grammarSource = {
//"city": "#interjection.capitalize#, #name#! I'm #profession.a#, not #profession.a#!",
"city": "#intro# #name#, the city of #descriptor#. She is a city #withStuff#, #withStuff#, #withStuff# and #withStuff#. #storyline#. #contradiction#. #moral#",
"intro": [
"Leaving there and proceeding for three days towards the east, you reach",
"Finally, the traveler comes to", "In vain shall I attempt to describe",
"At the end of three days, moving southward, you come upon",
"Finally the journey leads to",
"You walk for days among trees and among stones. Finally the journey leads to",
"Beyond six rivers and three mountain ranges rises",
"Travelers return from",
"It is with distinct memories that travelers return from",
"The traveler is invited to visit",
"In the center of",
"Rising above a deep, subterranean lake, is",
"The man who is traveling and does not yet know the city awaiting him along his route wonders about",
"The man who is traveling and does not yet know the city awaiting him along his route wonders what it will feel like. Each man bears in his mind a city made only of differences, a city without figures and without form, and the individual cities fill it up. This is not true of",
"Now I shall tell the story of",
"Proceeding eighty miles into the northwest wind, you reach",
"From there, after six days and seven nights, you arrive at",
"Of all the changes of language a traveler in distant lands must face, none equals that which awaits her in",
"A city must never be confused with the words that describe it, yet between the one and the other there is a connection. I can describe to you",
"",
"When she enters the territory of",
"It is the mood of the beholder which gives its form to",
"There is little I can tell you, beyond the things that its own inhabitants have always repeated, about",
"I will tell about the build of",
"In",
"After a seven day's march through woodland, the traveler cannot see it, and yet he has arrived in",
"Gods of two species protect",
"At",
"When you have arrived at",
"Never, in all my travels, have I ventured as far as",
"When you have forded the river, when you have crossed the mountain pass, you suddenly find before you",
"Belielfs are handed down in",
"Those who arrive at",
"Summoned to lay down the rules for the foundation of",
"Each year in the course of my travels I stop at",
"In the streets of",
"Recurrent invasions racked",
"I should not tell you of"
],
"name": [
"Chloe",
"Connie",
"Marisa",
"Caroline",
"Charlotte",
"Charlie",
"Linda",
"Carol",
"Emma",
"Aisha",
"Ava",
"Isabella",
"Isadora",
"Faith",
"Hope",
"Sophia",
"Mia",
"Amelia",
"Evelyn",
"Rosemary",
"Kimberly",
"Anna",
"Emilie",
"Ella",
"Scarlett",
"Victoria",
"Aria",
"Grace",
"Sarah",
"Camila",
"Fall",
"Spring",
"Summer",
"Winter",
"Penelope",
"Riley",
"Leyla",
"Lillian",
"Nora",
"Zoe",
"Mila",
"Adela",
"Lily",
"Eleanor",
"Nathalie",
"Leah",
"Hazel",
"Ellie",
"Paisley",
"Parley",
"Violet",
"Claire",
"Lucie",
"Aurora",
"Genesis",
"Aaliyah",
"Kennedy",
"Maya",
"Madelyn",
"Adeline",
"Alexa",
"Siri",
"Ariana",
"Brooke",
"Peyton",
"Helena",
"Raymonde",
"Jac",
"Jacquelyn",
"Naomi",
"Alice",
"Sadie",
"Eva",
"Autumn",
"Quinn",
"Nevaeh",
"Ruby",
"Willow",
"Everly",
"Cora",
"Lydia",
"Nova",
"Vivian",
"Selena",
"Jasmin",
"Madonna",
"Tatyana",
"Johanna"
],
"descriptor": ["people",
"history",
"way",
"art",
"worlds",
"information",
"understanding",
"theory",
"law",
"literature",
"software",
"problems",
"complexities",
"control",
"knowledge",
"power",
"ability",
"love",
"internet",
"television",
"science",
"faith",
"wisdom",
"community",
"languages",
"tongues",
"energy",
"decisions",
"disease",
"effort",
"opinions",
"passion",
"criticism",
"emphasis",
"loss",
"preference",
"priority",
"tension",
"confusion",
"comparison",
"resentment",
"significance",
"assumptions",
"chapters",
"perceptions",
"false perceptions",
"deceptions",
"presence",
"revolution",
"independence",
"commitment",
"penalties",
"consequences",
"intentions",
"departures",
"arrivals",
"obligations",
"negociations",
"reputations",
"experience",
"forces",
"pieces",
"answers",
"questions",
"terms and conditions",
"tests",
"reason",
"causation",
"nothing",
"beginnings",
"endings",
"chances",
"second chances",
"birth",
"scale",
"pressure",
"discipline",
"averages",
"mornings",
"desire",
"influence",
"minutes",
"time",
"hours",
"years",
"evidence",
"plenty",
"weight",
"backgrounds",
"options",
"letters",
"principles",
"relativity",
"minimums",
"maximums",
"excess",
"angles",
"dreams",
"limits",
"consideration",
"pleasure",
"contests",
"corners",
"layers",
"manners",
"trust",
"transitions",
"specialists",
"promise",
"disappointment",
"necessities",
"commonalities",
"familiarities",
"equivalents"
],
"withStuff": ["with sixty silver domes",
"with bronze statues of all the gods",
"with streets paved with lead",
"with a crystal theater",
"with a golden cock that crows each morning on a tower",
"where the buildings have spiral staircases encrusted with spiral seashells",
"where perfect telescopes and violins are made",
"where the foreigner hesitating between two women always encounters a third",
"where cockfights degenerate into bloody brawls among the bettors",
"with concentric canals watering it and kites flying over it",
"with wares such as agate, onyx, chrysoprase, and other varieties of chalcedony which can be bought here",
"with the praised flesh of the golden pheasant sprinkled with much sweet marjoram which is cooked here",
],
"storyline": ["All these beauties will already be familiar to the visitor, who has seen them in other cities",
"He was thinking of all these things when he desired a city",
"Four aluminum towers rise from its walls flanking seven gates with spring operated drawbridges that span the moat whose water feeds four green canals which cross the city, divinding it into nine quarters, each with three hundred houses and seven hundred chimneys",
"I could tell you how many steps make up the streets rising like stairways, and the degree of the arcades' curves, and what kind of zinc scales the roofs, but I already know this would be the same as telling you nothing",
"The city appears to you as a whole where no desire is lost and of which you are a part, and do nothing but inhabit this desire and be content"
],
"contradiction": ["But the special quality of this city for the man who arrives there on a September evening, when the days are growing shorter and the multicolored lamps are lighted all at once at the doors of the food stalls and from a terrace a woman's voice cries, ooh!",
"This city, therefore, is that of dreams: with one difference. The dreamed-of city contained him as a young man; he arrives there in his old age",
"Bearing in mind that the nubile girls of this city marry youths of other quarters and their parents exchange the goods that each family holds in monopoly, you can then work from these facts until you learn everything you wish about the city in the past, present and future",
"Or else you can say, like the camel driver who took me there 'I arrived here in my first youth, one morning, many people were hurrying along the streets towards the market, the women had fine teeth and I looked you straight in the eye, three soldiers on a platform played the trumpet, and all around wheels turned and colored banners fluttered in the wind'",
"The city does not consist of this, but of relationships between the measurements of its space and the events of its past: the height of a lamppost and the distance from the ground of a hanged usurper's swaying feet; the line strung from the lamppost to the railing opposite and the festoons that decorate the course of the queen's nuptial procession; the height of that railing and the leap of the aldulterer who climbed over it at dawn; the tilt of a guttering and a cat's progress along it as he slips into the same window",
"As this wave from memories flows in, the city soaks it up like a sponge and expands",
"But with all this, I would not be telling you the city's true essence; for while its description awakens desires one at a time only to force you to stifle them, when you are at the heart of this city one morning your desires waken all at once and surround you"
],
"moral": ["The traveler feels envy toward those who now believe they have once before lived an evening identical to this.",
"Desires are already memories.",
"Now I know this path is only one of the many that opened before me on that morning in this new city.",
"Such is the power of this city, you believe you are enjoying it fully when you are only its slave.",
"The city says everything you must think, makes you repeat her discourse, and while you believe visiting her you are only recording the names with which she defines herself and all her parts.",
"Forced to remain motionless and always the same, in order to be more easily remembered. The earth has forgotten her.",
"Each city receives its form from the desert it opposes.",
"Memory is redundant: it repeats signs so that the city can begin to exist.",
"This is a city that moves entirely upwards.",
"It is pointless to ask whether the new is better or worse than the old, since there is no connection between them.",
"The one contains what is accepted as necessary when it is not yet so; the others, what is imagined as possible and, a moment later, is possible no longer.",
"This said, it is pointless trying to decide whether this city is to be classified among happy cities or among the unhappy. It makes no sense to divide cities into these two species, but rather into another two: those that through the years and the changes continue to give their form to desires, and those in which desires either erase the city or are erased by it.",
"Here, memory is traded at every solstice and at every equinox.",
"The first who arrive could not understand what drew these people here, this ugly city, this trap.",
"True, also in this city the day will come when my only desire will be to leave. There is no language without deceit.",
"Abandonned before or after it was inhabited, this city cannot be called deserted.",
"The twin cities are not equal, because nothing that happens here is symmetrical. The two cities live for each other, their eyes interlocked; but there is no love between them.",
"This perhaps you do not know: that to talk of this city, I could not use different words. Falsehood is never in words; it is in things.",
"Here remains the half-city and it begins to count the months, the days it must wait before a complete life can begin again.",
"Alone, among all the cities of the empire, this city remains always the same.",
"Such is the power, sometimes called malignant, sometimes called benign, that the treacherous city possesses. Your labor which gives forms to desire takes from desire its form, and you believe you are enjoying the city wholly when you are only its slave."
]
};