You are on page 1of 38

Vine and Table cloth - two geometries.

The project SCIENAR explicitly aims in particular


• to create an interactive environment for both Scientist and
Artists,
•through this environment Scientists can explore the role that
Mathematics plays in understanding and making Art, as well
as produce mathematical objects that are useful in Art;
• while Artists can found mathematical structures and forms
that they can directly use, without needing the subtleties of
Mathematics, to inspire and produce their artworks.

ONE OF POSSIBLE WAY


HOW TO FILL UP THIS AIM IS
webMATHEMATICA
We will speak in this speech

1. about webMathematica as a possible tools for


producing artistic objects
2. about Lindenmayer systems, fractal plants and
Random walking as one of possible concepts
3. about our result achieved by the interaction between
science and art sphere in Slovakia
4. about the possibility - how to use dynamical web
pages in creating Your own "piece of art"
What is webMathematica?

WEBMATHEMATICA ENABLES THE CREATION


OF DYNAMICAL WEB SITES
THAT ALLOW USERS TO COMPUTE AND VISUALIZE
RESULTS DIRECTLY FROM A WEB BROWSER.

All of the computational power in Mathematica is available to


build special calculators and problem solvers that are
delivered over the web or over your corporate intranet to the
specific intranet site.

The development process is so simple that most


Mathematica users can proceed through it without having
to go through long development cycles or needing the
services of dedicated developers.

In many cases, all that is required is adding the Mathematica


commands and a couple of simple tags to a web page.
What is webMathematica?
webMathematica technology

• The web interaction of webMathematica is provided by a Java


web technology called Java servlets. Servlets are special Java
programs that run on a web server machine.
• Support is provided by a separate program called a servlet
container (or sometimes a "servlet engine") that connects to the
web server. One of popular servlet container is Apache Tomcat.
• Essentially all modern web servers support servlets natively
or through a plug-in servlet container.
• Closely related to Java servlets are Java Server Pages (JSPs);
both servlets and JSPs integrate very closely with
webMathematica.
• The computation and visualization engine for
webMathematica is Mathematica.
What is webMathematica?
webMathematica technology

And now for artists - simple and more useful

webMATHEMATICA allows a site to deliver HTML pages


that are enhanced by the addition of Mathematica
commands.

When a request is made for one of these pages, the


Mathematica commands are evaluated and the computed
result is inserted into the page and delivered to the client
browser.
What is webMathematica?
webMathematica technology

And now for artists - simple and more useful


How it works ?
1. Browser sent requests to webMathematica server.
2. webMathematica server acquire Mathematica kernel from the
pool.
3. Mathematica kernel is initialized with input parameters, it
carries out calculations, hand returns result to server.
4. webMathematica server returns Mathematica kernel to the
pool.
5. webMathematica server returns result to browser.
What is webMathematica?
webMathematica technology

We can demonstrate the real application running


on one part of Lindenmayer turtle graphics.
What is webMathematica?
webMathematica technology
How it works in real ?
explanation for artists
on example of Lindenmayer systems

1st step
Browser sends request to webMathematica server.

You can write to the web browser YOUR own Axiom,


Replacement rules, Number of iterations and Angle of
rotation.
How to choose these parameters is explained on all
created webMathematica pages.
What is webMathematica?
webMathematica technology
How it works in real ?
explanation for artists
on example of Lindenmayer systems

2nd step
webMathematica server acquires Mathematica kernel from the
pool.
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/webMathematica/Resources/XSL/mathml.xsl"?>

<%@ page language="java" %>


<%@ page contentType="text/html;charset=utf-8" %>
<%@ taglib uri="/webMathematica-taglib" prefix="msp" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="author" content="Monika Kovacova"/>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Fractals - Lindenmayer Systems</title>
</head>

Don't understand? Never mind!

This server activity is realized automatically, without


any needs from user.
What is webMathematica?
webMathematica technology
How it works in real ?
explanation for artists
on example of Lindenmayer systems

3rd step <msp:evaluate>


Mathematica kernel is LSystemWithF[axiom_, (* initial sequence *)
initialized with input rules_, (* replacement rules *)
iterations_, (* number of iterations *)
parameters, it carries out \[Delta]_ (* angle of rotation *)] :=
Module[{minus, plus, fastRules, last, direction},
calculations, hand returns (* computation of the two rotation matrices, for "right" and "left" *)
result to server. minus = {{ Cos[ \[Delta]], Sin[ \[Delta]]}, {-Sin[ \[Delta]], Cos[ \[Delta]]}};
plus = {{ Cos[-\[Delta]], Sin[-\[Delta]]}, {-Sin[-\[Delta]], Cos[-\[Delta]]}};

(* we rewrite the replacement rules in a form that is faster.*)


fastRules = rules /. {(a_ -> b_) -> (a :> Sequence @@ b)};

(* Initial position and direction *)


Don't understand? Never last = {0, 0}; direction = {1, 0};

mind! (* - multiple application of the replacement rules using Nest


- interpretation of F, + and - using Which.
If "only" the direction direction is to be altered, the result is ...; , i.e.,
Null
This server activity is realized - add the initial position using Prepend
automatically, without any - sort out all "non - motions" - i.e. Null using Select *)
Select[Prepend[(Which[# == "F", last = last + direction,
needs from user. # == "+", direction = plus.direction;,
# == "-", direction = minus.direction;]& /@
Nest[(# /. fastRules)&, axiom, iterations]),
{0, 0}], (* select all points *) # =!= Null&]]

</msp:evaluate>
What is webMathematica?
webMathematica technology
How it works in real ?
explanation for artists
on example of Lindenmayer systems

4rd step
webMathematica server returns Mathematica
kernel to the pool.

Don't understand? Never mind!

This server activity is realized


automatically, without any needs
from user.
What is webMathematica?
webMathematica technology
How it works in real ?
explanation for artists
on example of Lindenmayer systems

5th step
webMathematica server returns result to browser.

Do you want see it in practice?


Look at ...
http://www.webmathematica.eu/Scienar1/index.php
What is webMathematica?
webMathematica technology
real webMathematica pages

How it looks ?
What is webMathematica?
webMathematica technology

Do you want see it in practice?


Look at ...
http://www.webmathematica.eu/Scienar1/index.php
Lindenmayer systems
Mathematics and beauty plants

Fractal geometry is appropriate for many natural forms.


Natural shapes which are well-approximated by fractals
include clouds, mountains, trees, bushes, rocks, dirt,
leaves, snow flakes, lightning, turbulent water, tree bark,
rugged coastlines, brain convolutions, capillary beds,
bronchial tubes, and the distribution of galactic clusters.

To the artist, “well-approximated” means visually


convincing, while to the scientist it means descriptive
and/or predictive in a quantitatively meaningful way.
Lindenmayer systems
Mathematics and beauty plants

The beauty of plants has attracted


the attention of mathematicians for centuries.

Geometric features such as the bilateral symmetry of leaves, the


rotational symmetry of flowers, and the helical arrangements of
scales in pine cones have been studied most extensively.

„Beauty is bound up with symmetry.”

In case we want to understand the “beauty” of flowers from the


mathematical point of view, it is need to analyze two separate
look in for that prolem.

The first is the elegance and relative simplicity


of developmental algorithms.

The second is self-similarity. When each piece of a shape is


geometrically similar to the whole, both the shape and the cascade
that generate it are called self-similar.
Lindenmayer systems
Mathematics and beauty plants

Thus, self-similarity in plants is


a result of developmental processes.

The developmental processes are captured using the


formalism of modeling of L-systems.
L-systems were introduced in 1968 by Lindenmayer as a
plants theoretical framework for studying the development of
simple multi-cellular organisms.

After then the plant models expressed using L-systems


became detailed enough to allow the use of computer graphics
for realistic visualization formal graphics languages but also for
visualization of plant structures and developmental processes.
Lindenmayer systems
Mathematics and beauty plants

In 1968 a biologist, Aristid Lindenmayer, introduced a new


type of string-rewriting mechanism,
subsequently termed L-systems.
L-systems are applied in parallel and simultaneously
replace all letters in a given word.

The generated structures are one-dimensional chains of


rectangles, reflecting the sequence of symbols in the
corresponding strings.
In order to model higher plants, a more sophisticated
graphical interpretation of L-systems is needed
– we will show it later.
Lindenmayer systems
Mathematics and beauty plants
Lindenmayer systems
Mathematics and beauty plants

webMathematica pages - in real


How it looks ?
Lindenmayer systems
Mathematics and beauty plants

"axiom " F- F- F- F
"replacement rule " F ® F F - F + F - F - FF

"axiom " F- F- F- F
"replacement rule " F ® F - F F - - F - F
Lindenmayer systems
Mathematics and beauty plants

webMathematica pages - in real


We can create also automatic generator for L-systems.
It can produce also very attractive results.
Lindenmayer systems
Mathematics and beauty plants
Lindenmayer systems
Mathematics and beauty plants

Here are results produced by turtle walking (Lindenmayer systems)

See also (gallery or create Your own)


http://www.webmathematica.eu/Scienar1/index.php/l-systems
Lindenmayer systems
Mathematics and beauty plants

Here are results produced by turtle walking (Lindenmayer systems)

See also (gallery or create Your own)


http://www.webmathematica.eu/Scienar1/index.php/l-systems
Lindenmayer systems
Mathematics and beauty plants
Lindenmayer systems
Mathematics and beauty plants

According to the rules presented before, the turtle interprets


a character string as a sequence of line segments.
Depending on the segment lengths and the angles between
them, the resulting line is self-intersecting or not, can be more
or less convoluted, and may have some segments drawn many
times and others made invisible, but it always remains just a
single line.
However, the plant kingdom is dominated by branching
structures; thus a mathematical description of tree-like
shapes and methods for generating them are needed for
modeling purposes.
An axial tree complements the graph-theoretic notion of
a rooted tree with the botanically motivated notion of branch
axis.
Lindenmayer systems
Mathematics and beauty plants

Root or base
In the biological
context, these
edges are referred
to as branch
segments.
Internode
A terminal
segment (with no
succeeding edges)
is called an apex

Plants are generally modeled with a special type of rooted


tree called an axial tree.
Lindenmayer systems
Mathematics and beauty plants

Bracketed string representation


of an axial tree
F[+F][-F][-F]F]F[+F][-F]

Here are results produced by Fractal Plants application

See also (gallery or create Your own plants on)


http://www.webmathematica.eu/Scienar1/index.php/l-systems
You can
create
Your own
plant –

simple,
safety
and Your
plants do
not want
water for
long time.

http://www.webmathematica.eu/Scienar1/index.php/l-systems/
webmathematica/157-lindenmayers-plants
Lindenmayer systems
Mathematics and beauty plants

"axiom " X
@D D @ D
"replacement rules " X ® F X + X + F + F X - X " "
"" F ® FF""
"axiom " X
@D D @ D @ D
"replacement rules " X ® F X + X + F + F X - X - X + F + FX " "
"" F ® FF""
Lindenmayer systems
Mathematics and beauty plants

And the real art application?

The following application were created by Slovak


students of School of Applied Art,

cat Birch tree


Lindenmayer systems
Mathematics and beauty plants

cat Birch tree


Other applications

Starting with such an image, and creating mirror images to


the left, below, and lower left, we get an image that is typical
for a kaleidoscope.

Art application inspired by


webMathematica application
Other applications

We take a curve given in the form list


of circles and their parts and reflect
parts of this curve on some randomly
selected segments list of points.
Other applications – Penrose tilling
Other applications

Thank You very much and


You are welcome on

http://www.webmathematica.eu/Scienar1/index.php

Altering server
http://www.webmathematica.eu/Scienar/index.php

You might also like