<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!-- <!DOCTYPE Movie SYSTEM "dtd/RVML.dtd"> --> <Movie version="6" width="600" height="800" rate="12" backgroundColor="white" compressed="No" xmlns="http://www.kineticfusion.org/RVML/2.0"> <Title> Square to Circle Morph Example </Title> <Desc> Illustrates the right and wrong may to morph from one shape into another. In the first example, the starting points and directions of both shapes are the same. This allows all edges to morph with their closest counterpart in the other shape. In the second example, the edges of the FromShape are not specified in contiguous order and the morphing process cannot correctly perform a smooth morph. </Desc> <Definitions> <FontDefinition id="Arial" fontName="Arial" fontStyle="(bold)" fontRange="defined"/> <EditField id="curveHeading" bounds="bounds(-2, -2.0, 150, 14.0)" fieldName="" fontID="Arial" fontSize="10.0" alignment="left" charLimit="0" color="black" properties="(systemFont)"> <InitialText>Curve</InitialText> </EditField> <!-- Small box with 2 line styles per side --> <MorphShape id="MorphShape"> <CommonFillStyles> <FillStylePair> <ColorFill index="1" color="rgba(0, 102, 0, 255)"/> <ColorFill index="1" color="rgba(255, 0, 0, 255)"/> </FillStylePair> </CommonFillStyles> <CommonLineStyles> <LineStylePair> <LineStyle index="1" width="0" color="black"/> <LineStyle index="1" width="3" color="black"/> </LineStylePair> </CommonLineStyles> <FromShape bounds="bounds( -5, -5, 105, 105)"> <Edges> <!-- A circle has 8 curves so make our square have 8 edges --> <SetStyle line="1" mainFill="1"/> <Move x="100" y="50"/> <Line isRelative="Yes" y="50"/> <Line isRelative="Yes" x="-50"/> <Line isRelative="Yes" x="-50"/> <Line isRelative="Yes" y="-50"/> <Line isRelative="Yes" y="-50"/> <Line isRelative="Yes" x="50"/> <Line isRelative="Yes" x="50"/> <Line isRelative="Yes" y="50"/> </Edges> </FromShape> <ToShape bounds="auto"> <Edges> <Circle cx="50" cy="50" r="50"/> </Edges> </ToShape> </MorphShape> <!-- This Shape does not use contiguous edges - rendering is anarchic! --> <MorphShape id="MorphShape2"> <CommonFillStyles> <FillStylePair> <ColorFill index="1" color="rgba(0, 102, 0, 255)"/> <ColorFill index="1" color="rgba(255, 0, 0, 255)"/> </FillStylePair> </CommonFillStyles> <CommonLineStyles> <LineStylePair> <LineStyle index="1" width="0" color="black"/> <LineStyle index="1" width="3" color="black"/> </LineStylePair> </CommonLineStyles> <FromShape bounds="bounds( -5, -5, 105, 105)"> <Edges> <SetStyle line="1" mainFill="1"/> <Move x="100" y="50"/> <Line isRelative="Yes" y="50"/> <Move x="0" y="0"/> <Line isRelative="Yes" x="50"/> <Move x="100" y="100"/> <Line isRelative="Yes" x="-50"/> <Move x="50" y="0"/> <Line isRelative="Yes" x="50"/> <Move x="50" y="100"/> <Line isRelative="Yes" x="-50"/> <Move x="100" y="0"/> <Line isRelative="Yes" y="50"/> <Move x="0" y="50"/> <Line isRelative="Yes" y="-50"/> <Move x="0" y="100"/> <Line isRelative="Yes" y="-50"/> </Edges> </FromShape> <ToShape bounds="auto"> <Edges> <Circle cx="50" cy="50" r="50"/> </Edges> </ToShape> </MorphShape> </Definitions> <Timeline> <Frame> <Place name="MorphShape" depth="1"> <Transform translateX="10" translateY="10" scaleX="3" scaleY="3"/> </Place> <Place name="MorphShape2" depth="2"> <Transform translateX="10" translateY="400" scaleX="2" scaleY="2"/> </Place> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="5000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="10000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="15000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="20000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="25000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="30000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="35000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="40000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="45000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="50000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="55000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="60000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="65535"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="65535"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="60000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="55000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="50000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="45000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="40000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="35000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="30000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="25000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="20000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="15000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="10000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="5000"/> </Frame> <Frame> <Alter name="MorphShape" depth="1" ratio="0"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="5000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="10000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="15000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="20000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="25000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="30000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="35000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="40000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="45000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="50000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="55000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="60000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="65535"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="65535"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="60000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="55000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="50000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="45000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="40000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="35000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="30000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="25000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="20000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="15000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="10000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="5000"/> </Frame> <Frame> <Alter name="MorphShape2" depth="2" ratio="0"/> </Frame> </Timeline> </Movie>