[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-edu-devel
Subject:    Re: [kde-edu]: kig: how to "unconstrain" an object
From:       Jiří Paleček <jpalecek () web ! de>
Date:       2007-03-17 18:24:55
Message-ID: op.tpcg6v0pu2flwt () marcela-gaxm89c
[Download RAW message or body]

Hello,

On Fri, 16 Mar 2007 20:52:18 +0100, Maurizio Paolini  
<paolini@dmf.unicatt.it> wrote:

> I actually cannot understand your construction... could you please
> send me the '.kig' file of the basic construction?

Well, I don't know how much "basic" it is, but here it is.

I should describe the problem I'm trying to solve. It is well known that  
in a
Delaunay triangulation [a Delaunay triangulation of a set of points P is a  
graph
where there is an edge between points x and y iff there is a circle with  
x,y lying
on its circumference and having no point of P in its interior], no two  
edges
intersect if drawn by straight lines, provided that P is in general  
position.
I was trying to prove or disprove a similar fact, about a slightly  
different
graph. Let G be a graph where V=P, with P a set of points, and there is an  
edge
between x and y iff there exist a circle with center C and radius r, such  
that

1) |x-C|=r-d_x and |y-C|=r-d_y
2) For any z in P different from x,y, |z-C|>r-d_z

In other words, I have replaced points in P by disks with radius d_x and
I want an edge to have a circle, such that the disks of x,y are fully  
inside
that circle and any other disk is not fully inside.

The question is, whether such a graph is planar [And the answer is, I don't
know, but if it is drawn in the way that verticies are represented by their
points and edges by straight line segments, then edges can intersect].

So I wanted to construct a counterexample with kig. The construction is in
the attached file. It goes as follows: I want two edges to intersect, so
I start by their circles' centers. They are S1 and S2. I will constrain
myself a little bit more, in a way that I will want to have the disks of
each edge's endpoints to have the same radius (which will depend on the  
edge).
So, they will be on a circle slightly smaller than their edge's circle.
You can control the radius of this smaller circle with the control point.
So, to satisfy the requirements of an edge, you have to place points of  
that
edge to the circumference of the left/right smaller circle, but not inside
the other smaller circle. So I have placed the first two points on the
intersection of the smaller circles, these are points A and B. But now,
I would want to change the radii of the smaller circles and place the
other two points so that the edges would intersect. But if I move the
control point, points A, B would move too :-( which is not what I want.
BTW I "solved" this issue by writing down the coordinates of A, B and
the radius of their disks, then moving the control point, placing another
two points, again writing down their coordinates, deleting all and
recreating the points by their coordinates.

> As a general remark, did you try with a macro?

No. I don't know how would it help me to free/duplicate an object.

Regards
    Jiri Palecek

> On Fri, Mar 16, 2007 at 12:27:27PM +0100, Ji?í Pale?ek wrote:
>> Hello,
>>
>> I'd like to ask how can I create an object which is a copy of another
>> object, but is not constrained.
>>
>> For example, I have a construction which, depending on a position of a
>> point,
>> makes points lying on a circle whose radius is controlled by the point.  
>> I
>> want
>> to create four such points, two and two for a different radius. The  
>> problem
>> is, when I change the radius, the points move with the circle.
>>
>> I could do that by eg. introducing another parameter which will control  
>> the
>> second pair, but that would mean basically to create the construction  
>> twice
>> and a great mess on the screen.
>>
>> Thanks in advance
>>
>>      Jiri Palecek



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
["voronoi2.kig" (voronoi2.kig)]

<!DOCTYPE KigDocument>
<KigDocument axes="1" grid="1" CompatibilityVersion="0.7.0" Version="0.10.6" >
 <CoordinateSystem>Euclidean</CoordinateSystem>
 <Hierarchy>
  <Data type="string" id="1" >S2</Data>
  <Data type="string" id="2" >S1</Data>
  <Data type="string" id="3" >B</Data>
  <Data type="string" id="4" >A</Data>
  <Data type="double" id="5" >0.0244665</Data>
  <Data type="double" id="6" >-0.0664065</Data>
  <Data type="double" id="7" >-0.0153304</Data>
  <Data type="double" id="8" >0.0244665</Data>
  <Data type="double" id="9" >1.77636e-15</Data>
  <Data type="double" id="10" >-12</Data>
  <Data type="string" id="11" >%1</Data>
  <Data type="int" id="12" >0</Data>
  <Data type="string" id="13" >%1</Data>
  <Data type="double" id="14" >-0.0130629</Data>
  <Data type="double" id="15" >0.0345992</Data>
  <Data type="string" id="16" >%1</Data>
  <Data type="double" id="17" >0.0307746</Data>
  <Data type="double" id="18" >-0.0244665</Data>
  <Data type="int" id="19" >1</Data>
  <Data type="int" id="20" >0</Data>
  <Data type="string" id="21" >%1</Data>
  <Data type="string" id="22" >%1</Data>
  <Data type="int" id="23" >0</Data>
  <Data type="string" id="24" >Control point</Data>
  <Data type="int" id="25" >0</Data>
  <Data type="int" id="26" >1</Data>
  <Data type="double" id="27" >0.482614</Data>
  <Data type="int" id="28" >1</Data>
  <Data type="int" id="29" >0</Data>
  <Data type="int" id="30" >-1</Data>
  <Data type="string" id="31" >Seg1</Data>
  <Data type="int" id="32" >-1</Data>
  <Data type="hierarchy" id="33" >
   <input requirement="point" id="1" />
   <input requirement="point" id="2" />
   <input requirement="point" id="3" />
   <input requirement="point" id="4" />
   <input requirement="point" id="5" />
   <input requirement="int" id="6" />
   <intermediate action="calc" type="SegmentAB" id="7" >
    <arg>1</arg>
    <arg>2</arg>
   </intermediate>
   <intermediate action="fetch-property" property="length" id="8" >
    <arg>7</arg>
   </intermediate>
   <intermediate action="calc" type="CircleBPR" id="9" >
    <arg>3</arg>
    <arg>8</arg>
   </intermediate>
   <intermediate action="calc" type="SegmentAB" id="10" >
    <arg>1</arg>
    <arg>4</arg>
   </intermediate>
   <intermediate action="fetch-property" property="length" id="11" >
    <arg>10</arg>
   </intermediate>
   <intermediate action="calc" type="CircleBPR" id="12" >
    <arg>5</arg>
    <arg>11</arg>
   </intermediate>
   <result action="calc" type="CircleCircleIntersection" id="13" >
    <arg>9</arg>
    <arg>12</arg>
    <arg>6</arg>
   </result>
  </Data>
  <Data type="double" id="34" >-3.60542</Data>
  <Data type="double" id="35" >2.42219</Data>
  <Data type="double" id="36" >-10</Data>
  <Data type="int" id="37" >0</Data>
  <Data type="hierarchy" id="38" >
   <input requirement="point" id="1" />
   <input requirement="point" id="2" />
   <input requirement="point" id="3" />
   <input requirement="point" id="4" />
   <input requirement="point" id="5" />
   <input requirement="int" id="6" />
   <intermediate action="calc" type="SegmentAB" id="7" >
    <arg>1</arg>
    <arg>2</arg>
   </intermediate>
   <intermediate action="fetch-property" property="length" id="8" >
    <arg>7</arg>
   </intermediate>
   <intermediate action="calc" type="CircleBPR" id="9" >
    <arg>3</arg>
    <arg>8</arg>
   </intermediate>
   <intermediate action="calc" type="SegmentAB" id="10" >
    <arg>1</arg>
    <arg>4</arg>
   </intermediate>
   <intermediate action="fetch-property" property="length" id="11" >
    <arg>10</arg>
   </intermediate>
   <intermediate action="calc" type="CircleBPR" id="12" >
    <arg>5</arg>
    <arg>11</arg>
   </intermediate>
   <result action="calc" type="CircleCircleIntersection" id="13" >
    <arg>9</arg>
    <arg>12</arg>
    <arg>6</arg>
   </result>
  </Data>
  <Data type="double" id="39" >0.0156297</Data>
  <Data type="double" id="40" >0.912156</Data>
  <Data type="double" id="41" >-1.93286</Data>
  <Data type="double" id="42" >0</Data>
  <Data type="double" id="43" >-0.954194</Data>
  <Data type="double" id="44" >-0.0333033</Data>
  <Object type="FixedPoint" id="45" >
   <Parent id="41" />
   <Parent id="44" />
  </Object>
  <Object type="RelativePoint" id="46" >
   <Parent id="8" />
   <Parent id="18" />
   <Parent id="45" />
  </Object>
  <Object type="Label" id="47" >
   <Parent id="29" />
   <Parent id="46" />
   <Parent id="13" />
   <Parent id="1" />
  </Object>
  <Object type="FixedPoint" id="48" >
   <Parent id="10" />
   <Parent id="36" />
  </Object>
  <Data type="int" id="49" >-1</Data>
  <Data type="string" id="50" >%1</Data>
  <Object type="FixedPoint" id="51" >
   <Parent id="35" />
   <Parent id="39" />
  </Object>
  <Object type="RelativePoint" id="52" >
   <Parent id="42" />
   <Parent id="5" />
   <Parent id="51" />
  </Object>
  <Object type="Label" id="53" >
   <Parent id="25" />
   <Parent id="52" />
   <Parent id="21" />
   <Parent id="2" />
  </Object>
  <Data type="double" id="54" >0.729752</Data>
  <Object type="FixedPoint" id="55" >
   <Parent id="43" />
   <Parent id="34" />
  </Object>
  <Object type="CircleBCP" id="56" >
   <Parent id="45" />
   <Parent id="55" />
  </Object>
  <Data type="double" id="57" >-12</Data>
  <Data type="double" id="58" >0</Data>
  <Object type="FixedPoint" id="59" >
   <Parent id="57" />
   <Parent id="58" />
  </Object>
  <Object type="RayAB" id="60" >
   <Parent id="59" />
   <Parent id="48" />
  </Object>
  <Object type="ConstrainedPoint" id="61" >
   <Parent id="54" />
   <Parent id="60" />
  </Object>
  <Object type="RelativePoint" id="62" >
   <Parent id="14" />
   <Parent id="9" />
   <Parent id="61" />
  </Object>
  <Object type="Label" id="63" >
   <Parent id="37" />
   <Parent id="62" />
   <Parent id="11" />
   <Parent id="24" />
  </Object>
  <Object type="SegmentAB" id="64" >
   <Parent id="61" />
   <Parent id="59" />
  </Object>
  <Object type="ConstrainedPoint" id="65" >
   <Parent id="40" />
   <Parent id="60" />
  </Object>
  <Object type="Locus" id="66" >
   <Parent id="33" />
   <Parent id="60" />
   <Parent id="65" />
   <Parent id="45" />
   <Parent id="59" />
   <Parent id="51" />
   <Parent id="19" />
  </Object>
  <Object type="Locus" id="67" >
   <Parent id="38" />
   <Parent id="60" />
   <Parent id="65" />
   <Parent id="45" />
   <Parent id="59" />
   <Parent id="51" />
   <Parent id="30" />
  </Object>
  <Object type="SegmentAB" id="68" >
   <Parent id="61" />
   <Parent id="65" />
  </Object>
  <Property which="length" id="69" >
   <Parent id="68" />
  </Property>
  <Object type="CircleBPR" id="70" >
   <Parent id="45" />
   <Parent id="69" />
  </Object>
  <Property which="length" id="71" >
   <Parent id="64" />
  </Property>
  <Object type="CircleBPR" id="72" >
   <Parent id="51" />
   <Parent id="71" />
  </Object>
  <Object type="CircleCircleIntersection" id="73" >
   <Parent id="70" />
   <Parent id="72" />
   <Parent id="19" />
  </Object>
  <Object type="RelativePoint" id="74" >
   <Parent id="17" />
   <Parent id="6" />
   <Parent id="73" />
  </Object>
  <Object type="Label" id="75" >
   <Parent id="23" />
   <Parent id="74" />
   <Parent id="50" />
   <Parent id="4" />
  </Object>
  <Object type="RayAB" id="76" >
   <Parent id="51" />
   <Parent id="73" />
  </Object>
  <Object type="RayAB" id="77" >
   <Parent id="45" />
   <Parent id="73" />
  </Object>
  <Object type="ConicLineIntersection" id="78" >
   <Parent id="56" />
   <Parent id="77" />
   <Parent id="26" />
  </Object>
  <Object type="ConicLineIntersection" id="79" >
   <Parent id="56" />
   <Parent id="77" />
   <Parent id="32" />
  </Object>
  <Object type="SegmentAB" id="80" >
   <Parent id="79" />
   <Parent id="73" />
  </Object>
  <Property which="length" id="81" >
   <Parent id="80" />
  </Property>
  <Object type="CircleBCP" id="82" >
   <Parent id="73" />
   <Parent id="79" />
  </Object>
  <Object type="ConicLineIntersection" id="83" >
   <Parent id="82" />
   <Parent id="76" />
   <Parent id="28" />
  </Object>
  <Object type="ConicLineIntersection" id="84" >
   <Parent id="82" />
   <Parent id="76" />
   <Parent id="49" />
  </Object>
  <Object type="CircleBCP" id="85" >
   <Parent id="51" />
   <Parent id="84" />
  </Object>
  <Object type="CircleCircleIntersection" id="86" >
   <Parent id="70" />
   <Parent id="72" />
   <Parent id="30" />
  </Object>
  <Object type="RelativePoint" id="87" >
   <Parent id="15" />
   <Parent id="7" />
   <Parent id="86" />
  </Object>
  <Object type="Label" id="88" >
   <Parent id="20" />
   <Parent id="87" />
   <Parent id="16" />
   <Parent id="3" />
  </Object>
  <Object type="CircleBPR" id="89" >
   <Parent id="86" />
   <Parent id="81" />
  </Object>
  <Object type="SegmentAB" id="90" >
   <Parent id="86" />
   <Parent id="73" />
  </Object>
  <Object type="ConstrainedPoint" id="91" >
   <Parent id="27" />
   <Parent id="90" />
  </Object>
  <Object type="Label" id="92" >
   <Parent id="12" />
   <Parent id="91" />
   <Parent id="22" />
   <Parent id="31" />
  </Object>
 </Hierarchy>
 <View>
  <Draw width="-1" point-style="Round" namecalcer="none" style="SolidLine" \
shown="true" color="#0000ff" object="72" />  <Draw width="-1" point-style="Round" \
namecalcer="none" style="SolidLine" shown="true" color="#0000ff" object="70" />  \
<Draw width="-1" point-style="Round" namecalcer="none" style="SolidLine" \
shown="false" color="#0000ff" object="76" />  <Draw width="-1" point-style="Round" \
namecalcer="none" style="SolidLine" shown="true" color="#0000ff" object="89" />  \
<Draw width="-1" point-style="Round" namecalcer="none" style="SolidLine" shown="true" \
color="#0000ff" object="55" />  <Draw width="-1" point-style="Round" \
namecalcer="none" style="SolidLine" shown="false" color="#0000ff" object="80" />  \
<Draw width="-1" point-style="Round" namecalcer="1" style="SolidLine" shown="true" \
color="#0000ff" object="45" />  <Draw width="-1" point-style="Round" \
namecalcer="none" style="SolidLine" shown="true" color="#0000ff" object="60" />  \
<Draw width="-1" point-style="Round" namecalcer="none" style="SolidLine" shown="true" \
color="#0000ff" object="85" />  <Draw width="-1" point-style="Round" \
namecalcer="none" style="SolidLine" shown="true" color="#0000ff" object="56" />  \
<Draw width="-1" point-style="Round" namecalcer="none" style="SolidLine" shown="true" \
color="#0000ff" object="68" />  <Draw width="-1" point-style="Round" \
namecalcer="none" style="SolidLine" shown="false" color="#0000ff" object="77" />  \
<Draw width="-1" point-style="Round" namecalcer="none" style="SolidLine" shown="true" \
color="#0000ff" object="59" />  <Draw width="-1" point-style="Round" \
namecalcer="none" style="SolidLine" shown="true" color="#0000ff" object="84" />  \
<Draw width="-1" point-style="Round" namecalcer="31" style="SolidLine" shown="true" \
color="#0000ff" object="90" />  <Draw width="-1" point-style="Round" \
namecalcer="none" style="SolidLine" shown="true" color="#0000ff" object="79" />  \
<Draw width="-1" point-style="Round" namecalcer="none" style="SolidLine" shown="true" \
color="#0000ff" object="48" />  <Draw width="-1" point-style="Round" namecalcer="2" \
style="SolidLine" shown="true" color="#0000ff" object="51" />  <Draw width="-1" \
point-style="Round" namecalcer="none" style="SolidLine" shown="true" color="#0000ff" \
object="65" />  <Draw width="-1" point-style="Round" namecalcer="3" style="SolidLine" \
shown="true" color="#0000ff" object="86" />  <Draw width="-1" point-style="Round" \
namecalcer="none" style="SolidLine" shown="true" color="#0000ff" object="64" />  \
<Draw width="-1" point-style="Round" namecalcer="none" style="SolidLine" shown="true" \
color="#0000ff" object="78" />  <Draw width="-1" point-style="Round" namecalcer="24" \
style="SolidLine" shown="true" color="#0000ff" object="61" />  <Draw width="-1" \
point-style="Round" namecalcer="none" style="SolidLine" shown="true" color="#0000ff" \
object="82" />  <Draw width="-1" point-style="Round" namecalcer="none" \
style="SolidLine" shown="true" color="#0000ff" object="67" />  <Draw width="-1" \
point-style="Round" namecalcer="none" style="SolidLine" shown="true" color="#0000ff" \
object="66" />  <Draw width="-1" point-style="Round" namecalcer="4" style="SolidLine" \
shown="true" color="#0000ff" object="73" />  <Draw width="-1" point-style="Round" \
namecalcer="none" style="SolidLine" shown="true" color="#0000ff" object="83" />  \
<Draw width="-1" point-style="Round" namecalcer="none" style="SolidLine" shown="true" \
color="#0000ff" object="92" />  <Draw width="-1" point-style="Round" \
namecalcer="none" style="SolidLine" shown="true" color="#0000ff" object="53" />  \
<Draw width="-1" point-style="Round" namecalcer="none" style="SolidLine" shown="true" \
color="#0000ff" object="75" />  <Draw width="-1" point-style="Round" \
namecalcer="none" style="SolidLine" shown="true" color="#0000ff" object="63" />  \
<Draw width="-1" point-style="Round" namecalcer="none" style="SolidLine" shown="true" \
color="#0000ff" object="88" />  <Draw width="-1" point-style="Round" \
namecalcer="none" style="SolidLine" shown="true" color="#0000ff" object="47" />  \
</View> </KigDocument>



_______________________________________________
kde-edu mailing list
kde-edu@mail.kde.org
https://mail.kde.org/mailman/listinfo/kde-edu


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic