File:Plenoptic function b.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 264 × 246 pixels, file size: 25 KB)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    Description
    English: Parameterizing a ray in 3D space by position (x,y,z) and direction (θ,φ).
    Date
    Source Own work by uploader, designed to replace original bitmap en:Image:Plenoptic-function-b.png, but with clearer labeling.
    Author Qef
    SVG development
    InfoField
     The SVG code is valid.
     This vector image was created with MetaPost.
    Source code
    InfoField

    PostScript code

    metapost-source
    prologues := 3;
    beginfig(1);
    
    pair orig; orig = (5cm,5cm);
    axisposlen = 3cm; axisneglen = 1cm;
    z1 = orig - (axisneglen,0);       % left end of x axis
    vectorang = 65;
    z2 = orig - 1cm * dir vectorang;  % start of vector line
    z3 = orig + 3cm * dir vectorang;  % end of vector line
    
    % axes
    pair axisend[];
    axisend1 = orig + (axisposlen,0);
    draw z1--axisend1;
    label.rt(btex $x$ etex, axisend1);
    axisend2 = orig + (0,axisposlen);
    draw (orig - (0,axisneglen))--axisend2;
    label.top(btex $y$ etex, axisend2);
    axisend3 = orig + axisposlen * dir 45;
    draw (orig - axisneglen * dir 45)--axisend3;
    label.rt(btex $z$ etex, axisend3);
    pickup pencircle scaled 4pt;
    drawdot(orig);
    
    % dotted line for phi angle
    z4 = 0.8[orig,z3];
    z5 = (x4, ypart orig + 0.5cm);
    linecap := butt;
    pickup defaultpen;
    draw z4--z5--orig dashed evenly;
    
    % theta and phi labels and their curves
    angdist = 0.8cm;
    z6 = orig + angdist * up;
    draw z6{right}..(orig + angdist * dir vectorang);
    label.lft(btex $\theta$ etex, z6);
    z7 = orig + angdist * right;
    draw z7{up}..(orig + angdist * unitvector(z5 - orig));
    label.bot(btex $\phi$ etex, z7);
    
    % vector
    pickup pencircle scaled 1pt;
    linecap := rounded;
    drawarrow z2--z3;
    label.ulft(btex $(x,y,z)$ etex, orig);
    label.rt(btex $L(x,y,z,\theta,\phi)$ etex, z3);
    
    endfig;
    end
    

    Data

    mpost fig.mp
    ps2pdf -dEPSCrop fig.1 fig.pdf
    pstoedit -page 1 -dt -xscale 2 -yscale 2 -f sk fig.pdf fig.sk
    inkscape -z --vacuum-defs -f fig.sk -l fig.svg
    

    Licensing

    Public domain This work has been released into the public domain by its author, Qef. This applies worldwide.

    In some countries this may not be legally possible; if so:
    Qef grants anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    10 July 2007

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current07:28, 10 July 2008Thumbnail for version as of 07:28, 10 July 2008264 × 246 (25 KB)wikimediacommons>Qef{{Information |Description={{en|1=Parameterizing a ray in 3D space by position (x,y,z) and direction (θ,φ).}} |Source=Own work by uploader, designed to replace original bitmap Image:Plenoptic-function-b.png |Author=Qef |Date=2007-07-10

    There are no pages that use this file.