This action might not be possible to undo. Are you sure you want to continue?

BooksAudiobooksComicsSheet Music### Categories

### Categories

### Categories

Editors' Picks Books

Hand-picked favorites from

our editors

our editors

Editors' Picks Audiobooks

Hand-picked favorites from

our editors

our editors

Editors' Picks Comics

Hand-picked favorites from

our editors

our editors

Editors' Picks Sheet Music

Hand-picked favorites from

our editors

our editors

Top Books

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Audiobooks

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Comics

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Sheet Music

What's trending, bestsellers,

award-winners & more

award-winners & more

Welcome to Scribd! Start your free trial and access books, documents and more.Find out more

de/heart.htm ε := 0.01 Set tolerance for f-function.

Define functions to calculate points on surface of heart. ("Cor" is Latin for "heart.") Cor1( tol) := m←0 for i ∈ 1 .. 101 z ← 1.5⋅ −1 + i − 1 50

for j ∈ 1 .. 101 x ← 1.0⋅ −1 + j − 1 50

n←0 for k ∈ 1 .. 601 y ← 1.25⋅ −1 + k − 1

1000

3

− x ⋅z 10

2 3

2 2 2 f ← ( 2⋅ x + y + z − 1 )

− y ⋅z

2 3

if

f < tol n←n+1 F ← f

n

y1 ← y

n

if n ≥ 1 m←m+1 f ← min( F) for p ∈ 1 .. n Row ← x y1

(

p

z

)

if F = f

p

**H ← Row if m = 1 H ← stack( H , Row) otherwise H
**

Heart-3D-MC13-HP.xmcd 1/27/2011 1

.25⋅ −1 + k − 1 1000 2 f ← 2⋅ x + y + z − 1 if f < tol n←n+1 F ← f n ( 2 2 ) 3 − x ⋅z 10 2 3 − y ⋅z 2 3 y1 ← y n if n ≥ 1 m←m+1 f ← min( F) for p ∈ 1 . Heart1 〈1〉 〈2〉 〈3〉 Heart4 := augment augment Heart2 . Heart2 〈1〉 〈1〉 X := stack Heart1 .xmcd ( ( ( ( ) ) ) ) ( ( ) 〈1〉 X := stack X . Row) otherwise H Heart1 := Cor1( ε ) Heart2 := Cor2( ε ) 〈1〉 〈2〉 〈3〉 Heart3 := augment augment Heart1 . 1001 y ← 1. n Row ← x y1 ( p z ) if F = f p H ← Row if m = 1 H ← stack( H .. −Heart1 . 101 x ← 1.5⋅ −1 + i − 1 50 for j ∈ 1 . 101 z ← 1. Heart4 1/27/2011 ) ( ) 2 . −Heart2 .0⋅ −1 + j − 1 50 n←0 for k ∈ 602 .Cor2( tol) := m←0 for i ∈ 1 .. Heart2 〈1〉 X := stack X . Heart3 Heart-3D-MC13-HP..

Z) Heart-3D-MC13-HP. Heart2 〈2〉 Y := stack Y .〈2〉 〈2〉 Y := stack Heart1 . Heart4 ) ) ( ) 〈3〉 〈3〉 Z := stack Heart1 .xmcd 1/27/2011 3 . Heart3 ( ( ) 〈3〉 Z := stack Z . Heart2 〈3〉 Z := stack Z . Y . Heart4 ( ) Happy Valentine's Day 2011 ( X . Heart3 ( ( ) 〈2〉 Y := stack Y .

Notes on Construction 1. Heart-3D-MC13-HP. When all of the y-values have been computed for a given z and x. x ranging from -1 to 1. 2.xmcd 1/27/2011 4 . and must be obtained by invoking the bilateral symmetry of the heart.25. then a row of th H matrix. the saved (x. the column of y values. The first part is the surface piece swept out by an xz plane starting at y = -1. Whenever the absolute value of f is less than a pre-specified tolerance. Cor1 and Cor2. 3.5 to 1. H-right is just H-left with the second column. Basic Approach The basic approach use herein is to calculate values of f = f(x.0.5 and moving to y = 0. The H matrix contains all of the saved surface points. piecewise in two parts. because y would not be a function of z and x if we swept from y = -1.z) point is the one closest to the true surface point. The right half is. it is an mx3 matrix.z) is saved.y. Given the mx3 matrix H-left that describes the left side of the heart. The implicit function theorem ensures that y is a single-valued function of z and x on each of the two surface pieces. Bilateral Symmetry Cor1 and Cor2 only construct the left half of the heart. The second part is the surface piece swept out by the xz plane starting at y = -0. the y-value is saved and a counter (n) is incremented.y.y. and y ranging from -1. This is why there are two Cor functions.z) with z ranging from -1.25 to 1. This insures that of all the possible y values in an ε neighborhood of the true point on the heart's surface.25.25 all the way to y = +1.5. The y-value is that y for which | f | is the smallest.5. Implicit Function Theorem The heart surface defines y implicitly as a function of z and x. multiplied by -1. Each Cor function is assured of finding at most exactly one y on or near the heart surface as y sweeps to the right along each of the two surface pieces.25 and moving to y = -0. Row = (x.

Heart-3D-MC13-HP.5.25 to -0. Heart3 and Heart4 comprise the right side of the heart. y ranges from -0. Heart1 and Heart 2 comprise the left side of the heart. On the second surface piece. Heart3 is Heart1 with its second column (the y values) negated. On the first surface piece.xmcd 1/27/2011 5 .5 to 0.Cor2 is needed so as to be able to construct y as a piecewise function of z and x on the left half of the heart.0. By bilateral symmetry. y ranges from -1. Heart4 is Heart2 with its y values negated.

as taken from the Reference. does indeed describe a heart-shaped surface.xmcd 1/27/2011 6 .So the heart surface of the Reference can indeed be constructed as a Mathcad 3D scatter plot. This construction verifies numerically that the equation f(x.y. Heart-3D-MC13-HP.z) = 0.

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue listening from where you left off, or restart the preview.

scribd