Bestand:Centipede forward propagation.gif

Pagina-inhoud wordt niet ondersteund in andere talen.
Uit Wikipedia, de vrije encyclopedie

Centipede_forward_propagation.gif(320 × 240 pixels, bestandsgrootte: 1,28 MB, MIME-type: image/gif, herhalend, 50 frames, 1,5 s)


Beschrijving

Beschrijving
English: Most centipedes and all millipedes, and indeed 4-legged creatures, walk with the rear legs leading the legs in front. In centipedes, this results in waves propagating from back to front. This simulation was created in w:OpenSCAD using a leg motion in which each foot spends half the time on the ground, and the motion of legs in adjacent segments are offset in phase by 45°. Changing the sign of the phase offset results in forward locomotion with the waves propagating from front to back, which is a characteristic of some centipedes such as scolopendra heros.

See also File:Centipede backward propagation.gif.

Datum
Bron Eigen werk, scaled from the original in my blog article at https://www.nablu.com/2022/12/metachronal-waves-of-legs.html
Auteur Anachronist

OpenSCAD source code

/*
OpenSCAD code for centiped walking model

To animate in OpenSCAD, go to View -> Animate. In the animation fields,
set FPS to 3 and Steps to a value between 20-50.

The purpose of this script is to visualize the motion of a centipede's
legs in both modes of locomotion: with leg waves propagating from back
to front, and front to back -- with both modes resulting in forward
movement of the centipede.

Each segment of the centipede has a pair of legs that constantly windmill
around. Each successive segment has the phase of the windmilling offset
by 45 degrees from the previous segment. The offset direction is
controlled by the 'phase_direction' parameter. The phase_direction
values 1 or -1 result in forward or backward propagation, respectively.

The legs flex at the knees to look more natural.
*/

// ---------- customizable values ----------

phase_direction = 1;    // Set to 1 (back-to-front waves) or -1

segspacing = 12;    // spacing between segments
nsegs = 21;         // number of segments
leglen = 22;        // leg length at max extension
legr = 2;           // leg radius
legkneeht = 3;      // knee height at max leg extension
legangle = 15;      // overal downward leg tilt angle from body

// ---------- calculated values ----------

bodywid = 1.5*segspacing;           // body segment width
body_elev = leglen*sin(legangle);   // elevation of bottom of body above floor
legseglen = sqrt(leglen*leglen*0.25 + legkneeht*legkneeht); // length of a leg segment (each leg is 2 segments)
xmotion = 1.7*segspacing;           // front-to-back motion of each foot in the x direction
llmin = leglen*cos(asin(0.5*xmotion/leglen));   // minimum leg length when leg is perpendicular to body and foot is on the floor

// --------- render ----------

// $t is set internally by the animation option; initially it is zero.
// It ranges from 0 to 1 in increments determined by Steps, and repeats.

centipede(360*$t);
floor(360*$t);

// ---------- modules ----------

// render the whole centipede
module centipede(phase=0) {
    ns2 = nsegs/2;
    for(i=[0:nsegs-1]) translate([segspacing*(i-ns2),0,0]) bodyseg(phase, phase_direction*i*45);
    translate([segspacing*(-1-ns2),0,0]) head();
}

// single body segment with legs positioned at phase angle 'phase' with phase offset 'offset'
module bodyseg(phase=0, offset=0) {
    bodyblank();
    translate([0,0,body_elev]) color("orange") {
        translate([0,bodywid,legr]) rotate([-legangle,0,0]) leg(phase, offset);
        mirror([0,1,0]) translate([0,bodywid,legr]) rotate([-legangle,0,0]) leg(phase+180, offset);
    }
}

// head includes eyes and antennae, but no legs
module head() {
    bodyblank();
    // eyes
    translate([-bodywid/3,bodywid/2,body_elev+bodywid/3]) color("#00FF00") sphere(r=bodywid/4, $fn=20);
    translate([-bodywid/3,-bodywid/2,body_elev+bodywid/3]) color("#00FF00") sphere(r=bodywid/4, $fn=20);
    // antennae
    rotate([20,0,-45]) translate([0,0,body_elev+1]) color("brown") cylinder(bodywid*1.3, r=legr/2, $fn=8);
    rotate([-20,0,45]) translate([0,0,body_elev+1]) color("brown") cylinder(bodywid*1.3, r=legr/2, $fn=8);
}

// blank body segment, used by bodyseg() and head()
module bodyblank() {
    translate([0,0,body_elev])
        color("gray") scale([0.618,1,1]) {
            cylinder(2*legr, r=bodywid, $fn=24);
            translate([0,0,2*legr]) scale([1,1,0.382]) sphere(r=bodywid, $fn=24);
        }
}

// Model of one leg.
// The 'foot' of the leg follows a straight line backward on the floor, and arches
// over forward in a semicircle. The knee flexes to accommodate moving backward in
// a straight line, with full extension in the forward and back positions.
module leg(phase=0, offset=0) {
    ph = (phase + offset + 3600) % 360;
    if (ph < 180) {
        x = 0.5*xmotion*cos(ph);
        y = 0.5*xmotion*sin(ph);
        zrot = -asin(x/leglen);
        xrot = asin(y/leglen);
        rotate([0,0,zrot]) rotate([xrot,0,0]) ballcylinder([0,0,0], [0,leglen/2,legkneeht], [0,leglen,0]);
    } else {
        x = xmotion * ((ph-180)/180 - 0.5);
        zrot = -asin(x/leglen);
        ll = sqrt(llmin*llmin + x*x);
        kneeht = sqrt(legseglen*legseglen - ll*ll*0.25);
        
        rotate([0,0,zrot]) ballcylinder([0,0,0], [0,ll/2,kneeht], [0,ll,0]);
    }
}

// the leg is two segments with a knee; parameters are coordinates of the root, knee, and foot.
module ballcylinder(p1, p2, p3, r=legr) {
    fn = 10;
    hull() {
        translate(p1) sphere(r=r, $fn=fn);
        translate(p2) sphere(r=r, $fn=fn);
    }
    hull() {
        translate(p2) sphere(r=r, $fn=fn);
        translate(p3) sphere(r=r, $fn=fn);
    }        
}

// moving floor tiles
module floor(phase=0) {
    xp = phase/360 * 2*xmotion;
    for(i=[0:nsegs+6]) let(x=(i-nsegs/2-3)*xmotion)
        for(j=[0:10]) let(y=(j-5)*xmotion, col = (i+j)%2==0 ? "white":"lightblue")
            translate([x+xp,y,0]) color(col) cube([xmotion,xmotion,0.1], center=true);
}

Licentie

Ik, de auteursrechthebbende van dit werk, maak het hierbij onder de volgende licentie beschikbaar:
w:nl:Creative Commons
naamsvermelding Gelijk delen
Dit bestand is gelicenseerd onder de Creative Commons Naamsvermelding-GelijkDelen 4.0 Internationaal licentie.
De gebruiker mag:
  • Delen – het werk kopiëren, verspreiden en doorgeven
  • Remixen – afgeleide werken maken
Onder de volgende voorwaarden:
  • naamsvermelding – U moet op een gepaste manier aan naamsvermelding doen, een link naar de licentie geven, en aangeven of er wijzigingen in het werk zijn aangebracht. U mag dit op elke redelijke manier doen, maar niet zodanig dat de indruk wordt gewekt dat de licentiegever instemt met uw werk of uw gebruik van zijn werk.
  • Gelijk delen – Als u het werk heeft geremixt, veranderd, of erop heeft voortgebouwd, moet u het gewijzigde materiaal verspreiden onder dezelfde licentie als het oorspronkelijke werk, of een daarmee compatibele licentie.

Bijschriften

Beschrijf in één regel wat dit bestand voorstelt
Simulated centipede animation walking with a posterior propagation gait

Items getoond in dit bestand

beeldt af

image/gif

c9e9bcff3c912650a76f132a3799f21ef7c71de6

1.344.404 byte

1,500000000000001 seconde

240 pixel

320 pixel

Bestandsgeschiedenis

Klik op een datum/tijd om het bestand te zien zoals het destijds was.

Datum/tijdMiniatuurAfmetingenGebruikerOpmerking
huidige versie4 jul 2022 04:30Miniatuurafbeelding voor de versie van 4 jul 2022 04:30320 × 240 (1,28 MB)AnachronistUploaded own work with UploadWizard

Dit bestand wordt op de volgende pagina gebruikt:

Globaal bestandsgebruik

De volgende andere wiki's gebruiken dit bestand: