File: slidestr.fe

package info (click to toggle)
evolver 2.70+ds-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 17,148 kB
  • sloc: ansic: 127,395; makefile: 209; sh: 98
file content (63 lines) | stat: -rw-r--r-- 1,701 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//  slidestr.fe

//  Evolver data for drop of prescribed volume sitting
//  on hyperbolic slide with gravity.  Illustrates corner
//  holding drop against gravity.

// Instructions for simple use:
//   refine once
//   iterate until drop settles into curve (datafile starts with
//       gravity = 1 to pull drop down)
//   Use `G' command to reverse gravity.  Blob is stable up to
//      about G = -.8
//
//   You can color the blob edges with
//      set edge color white where not fixed

STRING  // one-dimensional surface
space_dimension 2

// Constraint of form   m*x + x*y = k with m = 0.5, k = 0.1
// Integrals are used for volume, since zero density facets
// don't move, and their stretching around the curve gives
// an inaccurate volume.

PARAMETER STEEP = 0.5
PARAMETER SHARP = 0.1

constraint 1  //  the slide, constants are steepness and sharpness
formula: STEEP*x + x*y = SHARP
content:
c1: log(x)*SHARP - STEEP*x    // note this is indefinite integral of y


constraint 2  //  the slide, for display
formula: STEEP*x + x*y = SHARP

vertices
1  0.0  2.2  constraint 1
2  0.0  0.8  constraint 1
3  0.5  2.2 
4  0.5  0.8
5  0.0  2.5   constraint 2 fixed  // for slide display
6  0.3  0.2   constraint 2 fixed  // for slide display
7  1.5  .0   constraint 2 fixed  // for slide display

edges  /* given by endpoints and attribute */
1   2 4
2   4 3
3   3 1
4   5 6 fixed constraint 2  // for slide display
5   6 7 fixed  constraint 2 // for slide display

faces  /* given by oriented edge loop */
1   1 2 3


bodies  /* one body, defined by its oriented faces */
1   1   volume 0.7  density 1.0

read

// Typical evolution, doing V's to keep vertices spread.
gogo := { r; {g 10; V;} 40 }