                 Splitting faces to help plotting

Load the file Reference.SplitFigs into !Draw to see the figures.

Faces are plotted by simply sending their areas to the screen. So they have
to be sent in order starting from the back. Fig.1 demonstrates the problem
which causes the 3D plotting program to give the warning message: Faces
intersect; sorted incorrectly. Here face 1 must be plotted before face 2
which must be plotted before face 3 which must be plotted before face 1!

The standard method of plotting such a figure is to keep account of each
pixel in the figure and not to overwrite any which have already been used
to plot a point nearer the front. This is extremely expensive in time and
memory for a problem which occurs so seldom.

The snub polyhedra W114 and W116 have many such overlapping faces and
!Stellate version 2.00 has a method which mostly solves this problem.

Start !Stellate and display the 3D view of W116 with unshaded component
colouring selected from the 3D menu. At about 10 oclock from the centre you
can see the three yellow faces which have been extracted into Fig 2. Compare
Fig 2 with Fig 1 and you will see that it shows the same problem in that the
faces each lie on top of the next. These faces all come from the area in the
stellation diagram of component 3 (shown in Fig 4 with a detail in Fig 5).
Fig 3 shows what happens if these faces are plotted normally, 1 is behind 2
is behind 3 but 3 is not behind 1. Face 3 happens to lie in the plane of the
figure and so looks just like that in Fig 5. The others are foreshortened.

The problem is solved by splitting these faces into two parts and the
joining them after they have been plotted. The white line in Fig. 5 shows
how the face is split so you can see that the right hand half of face 3 (Fig
3) can be plotted first, then face 1, face 2 and finally the left hand half
of face 3. The parts of 3 are then plotted without any line along their
join.

                 How to make split faces

** Do not attempt the following exercise until you have had quite a lot of
** practice at selecting areas from stellation diagrams.

Select W116 in !Stellate again and get the stellation diagram for component
3 in the main window. Set the magnification to 4.0 and move the image in the
window using the sliders to see the area shown in Fig 5. You can see that
the face here has a white line through it where it has been split for
plotting. Erase this face by clicking over it with <ADJUST> and make it
again following the figure to select the correct lines. Check very carefully
with the diagram to make sure you have selected the right area (otherwise
erase it and try again). The area you have made will not have the white line
through it but otherwise should look like that in Fig 5.

Click over Reset to make the scale 1 and click Plot Solid. If all is
correct you should get the warning message Faces intersect; sorted
incorrectly. If not, check that you have Full sort selected in the 3D
window menu. If you get the message about Solid is not closed... it means
that you have not selected the face correctly so try again.

You can see that the fiddly bits of the yellow faces (the ones corresponding
to the face you have remade) do not intersect correctly and look like Fig 3.

Go back and remake the face in the component 3 stellation diagram (with
scale=4.0) but this time, after selecting Front to show the face, click on
the Split icon just below. Next, click over a point at the end of the
Split shown in the figure. This should make a large dot at that point.
(You must click over a vertex of the area you have just selected otherwise
it will cause an error.) Next click over the point at the other end.
The points should now be joined by the white line and the tick in the
Split icon should become grey.

Click over Reset to make the scale 1 and click Plot Solid. It should now
be OK; the overlapping bits of the yellow faces do so correctly. This is
because those faces are now plotted in two parts in the 3D view.

The splits needed in W116 occur in components 2 and 3 and each go between
two vertices in the faces.

The splits in W114 are more complicated; there is one in component 1 taking
off the jagged points of the 5-pointed star, three in component 2 and one in
component 3. The ones in components 1 and 3 go between vertices of their
faces but the ones in component 2 all go between a vertex and the middle of
an edge. This is allowed provided you select on the vertex end first when
making the split. W114 now plots correctly for most orientations.

                 Rules for making splits in faces.

 1) You must be in the Lines mode of selecting faces.
 2) The split can only be made immediately after creating the face.
 3) The first end of the split must be over a vertex of the face.
 4) The other end of the split may be at a vertex or in the middle of an
    edge but the split must lie entirely over the face (splits between two
    vertices are more efficient).
 5) Only one split is allowed per face.

                 Saving split definitions

The split face definitions will be stored in the polyhedron definition file
NewLine as defined in Reference.FormList and in the PolyData file where
the format is defined in !PolyDraw.Docs.FormData. Only versions of
PolyDraw later than 3.10 and PolyNet later than 1.13 can read data with
split faces.
