Subject: CGAL users discussion list
List archive
- From: Mael <>
- To:
- Subject: Re: [cgal-discuss] Offsets in periodic triangulations
- Date: Wed, 25 Jul 2018 10:14:24 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
- Ironport-phdr: 9a23:tRDFdhzx16hCz9HXCy+O+j09IxM/srCxBDY+r6Qd2+kWIJqq85mqBkHD//Il1AaPAd2Fraocw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze+/94HSbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeuBWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbOSxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDwULs6Wymt771zRRH1likHOT43/mLZhMN+g61Uog6uqgdlzILIeoyYLuZyc63fcN4cWGFPXtxRVytEAo6kaIUAFfQOPeJFpIT6olsBtwWxBQ22COP1zT9Im3D30rM+0+g7FQHJxhcvEMkQv3nPo9X6KqASUeWrw6nU1zXCb/1W1i3h54jUdRAhu/GNUahsfsrWzEkiDgXIhUiep4ziOjOazOUNs26D4uV8WuKgkWonpxt2oji1ycchjJTCiIENyl3c6Cl0woU4Kce2RUN1e9KoDptduzyAO4Z5Rs4uW2VltDogxrAFuJO3ZioHxIo9yxLCavGKfI6F6Q/5WumLOzd3nndldaq/hxms9UigzfXxWteu3FZPqSpJj9vBu34X2xzW8MeHS/998l6m2TaSywDf8OZEIV40labBLZ4u3KIwmoISsUTFACD2hF37gLKUe0gn4OSl5erqbq/4qpKcKoN4kA7zP6A2lsy6G+s4MwwOX2aB+eS70b3u5Uj5T69Ugf0yiKXZqpfaJdkUp6GnBw9ZyIIj5AykADi9ztsVhnYHI0xCeBKCkYfpJ0vOIfD2Dfiln1usjDBrx+rGP7H7HprNKX3DnK/7fblh805c1BYzzddH6p1IBbEOOvbzVlbsu9zZFR82LxG0w/38CNhmzYMfWWePAreDP6/IsF+I4PgvI+iWa4MPtjb9Matt2/m7hnAwnRoRfLKiwIAMQHG+BPVvZUuDMlT2hdJUNG4HukJqSeXnjBuYViNDanL0W6s27DwTB4+hCIrfXJGjibed2z2qWJZRYzYVWRi3DX70etDcCL83YyWIL5o5y21WZf2aU4YkkCqWmkr/wrtjIPDT/3dB553u0914+/fCmxg56TtuHoKW1GTfFzgozFNNfCc/2eVEmWI40k2Ki/EqjPFfENFP/eJHWwwmMoTNied9DoKqA1+TTpKyUF+jB+6eL3QxQ9Y2mYFcOQB4HIz91VbG1iuuRrgIi/qMGpxy9K/AjSD8
Hello, It depends what you mean by "position" : - If you mean you want to compute the canonical position because you have a point in R^2, you can compute its offset and then you'll have to subtract the offset to get the canonical position. - If you mean you want to compute the "real world" R^2 position because you have a canonical position (for example that of a vertex, obtained through v->point()) and you have a given offset, then you'll add the offset. I guess you mean the second case. p2t2.point(f, 0), p2t2.point(f, 1), p2t2.point(f, 2) will give you a geometrically correct face in R^2 (and thus you can draw your segments crossing the canonical cube borders correctly). Best, Mael On 24/07/2018 18:00, GAD FLY wrote:
It seems
the answer would be (xp - L, yp)?
On Tuesday,
July 24, 2018 9:52 AM, GAD FLY
<> wrote:
Thank you Mael
for your detailed explanation.
However, when for
example a periodic point (xp,yp) in 2D has
offset of (2,0), to find its position should
we try (xp + 2*L , yp) where L is the box
size?
On Friday, July 20, 2018 3:42 AM, Mael
<> wrote:
Hello,
An illustration of the offsets
is given this
figure in the
Periodic_3_triangulation_3
documentation. The offset vector
(or just simply offset) expresses
a translation: a periodic domain
is an axis-aligned cuboid that by
definition repeats itself in the
x, y and z directions and thus
forms a tiling of the space. If we
arbitrarily choose a tile and name
it the main tile, we can number
all the other tiles via 3 numbers,
the amount of steps we have to do
in the x, y, and z direction to
reach that tile from the main
tile. That's the offset.
What is important to understand
is that points of a periodic
triangulation all live in the same
cube (the one with offset (0,0,0),
also known as fundamental
or canonical domain).
Offsets are then used to indicate
relative positions within an
element of the periodic
triangulation.
For example, in 3D and using
the unit cube as fundamental
domain, the cell composed of the
points:
(0.7, 0.9, 1.1)
(0.8, 0.8, 0.9) (0.9, 1.2, 0.9) (1.0, 0.9, 1.1) is going to be represented as
(0.7, 0.9, 0.1) with
offset (0,0,1)
Thus, when you drawing your
triangulation, you should iterate
over its elements and take into
account the offsets to compute the
positions you have to draw in full
space (this is basically reading the
example above from the bottom up).
Whichever dimension you are in,
there are functions to obtain a
position in Euclidean space from a
vertex within an element (e.g. periodic_point()).
There are also functions to save and
output periodic triangulations,
which you can inspire yourself with
if they're not satisfactory for you.
(0.8, 0.8, 0.9) with offset (0,0,0) (0.9, 0.2, 0.9) with offset (0,1,0) (0.0, 0.9, 0.1) with offset (1,0,1) Best, Mael On 20/07/2018 01:42, GAD FLY wrote: Hi everyone! |
- [cgal-discuss] Offsets in periodic triangulations, GAD FLY, 07/20/2018
- Re: [cgal-discuss] Offsets in periodic triangulations, Mael, 07/20/2018
- Re: [cgal-discuss] Offsets in periodic triangulations, GAD FLY, 07/24/2018
- Re: [cgal-discuss] Offsets in periodic triangulations, GAD FLY, 07/24/2018
- Re: [cgal-discuss] Offsets in periodic triangulations, Mael, 07/25/2018
- Re: [cgal-discuss] Offsets in periodic triangulations, GAD FLY, 07/24/2018
- Re: [cgal-discuss] Offsets in periodic triangulations, GAD FLY, 07/24/2018
- Re: [cgal-discuss] Offsets in periodic triangulations, Mael, 07/20/2018
Archive powered by MHonArc 2.6.18.