Home
Help
Resources
Extensions
FAQ
NetLogo Publications
Donate

Models:
Library
Community
Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Web
Printable
Chinese
Czech
Farsi / Persian
Japanese
Spanish

# Conic Sections 2

 If you download the NetLogo application, this model is included. You can also Try running it in NetLogo Web

## WHAT IS IT?

The model displays two basic conic sections: hyperbolas and parabolas. The figures are generated behaviorally as opposed to algebraically - the turtles attempt to behave like points on the specified shape. The partner to this model is called "Conic Sections 1".

A parabola is the set of all points that are the same distance from a point (focus) and a line (directrix). A hyperbola is based on the same idea as is a parabola except that it is reflected over the directrix.

The ancient Greeks discovered that each conic section can be found by taking a cross section of one or two cones with their points pointing toward each other. A circle results from taking a slice that is perpendicular to the axis, while an ellipse results from taking a slice of one cone that is not perpendicular to the axis. Similarly, a parabola results from a cross section that passes through one cone in a vertical fashion, such that the plane of the cut is parallel to one face. A hyperbola results from a vertical section that passes through both cones.

## HOW IT WORKS

The turtles use feedback to make decisions about how they behave. They set out in random directions, and then they receive information as to whether or not they are getting closer to where they want to be. If they are getting closer, they continue moving forward in the direction they are going. If they are moving farther away, they set out in a new random direction. This process is akin to the children's game of "Hot and Cold", in which players are told whether they are getting "hotter" or "colder" in relation to a hidden goal.

## HOW TO USE IT

### Hyperbolas

• Select the number of turtles with the NUM-TURTLES slider.
• Press SETUP.
• Make sure the DIRECTRIX? switch is set to OFF.
• Press GO
• click at two points in the view to set the foci

### Parabolas

• Select the number of turtles with the NUM-TURTLES slider.
• Press SETUP.
• Make sure the DIRECTRIX? switch is set to TRUE.
• Press GO
• click at two different locations in the view to set the directrix and the focus.

## THINGS TO NOTICE

When forming a hyperbola, turtles adjust their positions from two user-defined foci so that the difference between their distances from the foci attains a value of CONSTANT.

When forming a parabola, turtles move to an equal distance from the directrix to the focus.

## THINGS TO TRY

Adjust the slope of the parabola's directrix or the value of CONSTANT for the hyperbola while the turtles are still moving. See how they react to the changes in their environment.

You may be able to get a better feeling for the turtles' behavior if only a few turtles are in the world at one time. Try setting num to a small value (like 16 or 1), and watching the turtles.

Both of these conic sections can be observed by shining a flashlight at a cone and looking at its shadow. Can you figure out at what angles the cone must be held?

## EXTENDING THE MODEL

Look at the StarLogoT model 'emergent-circle'. Watch how the turtles react with each other- something that is missing from 'Conic Sections'. Implement this emergent behavior for one or all of the conics in this project.

## NETLOGO FEATURES

Like more traditional programming languages (e.g. Java), NetLogo can have procedures that report a value to the caller. The command used is called `report` --- it takes one input, the value to be reported. Look at the function `pos`. It takes two inputs, `x` and `y`, and reports a boolean.

Conic Sections 1

## HOW TO CITE

If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.

For the model itself:

Please cite the NetLogo software as: