Задача №3.25 ( Меркулова Тамара, 203 группа, 2011/12 уч.гг.)

Визуализировать склейку проективной плоскости из квадрата.

Manipulate[

sht1=If[SHTR1,1,0];
sht2=If[SHTR2,1,0];
sht3=If[SHTR3,1,0];
sht4=If[SHTR4,1,0];

Show[
{
ParametricPlot3D[
{
t*(1+Cos[2or])Cos[2(π/2)],
t*(1+Cos[2or])Sin[2(π/2)]+(1-t)(-π/2),
2*t*Sin[2or]Sin[π/2]+(1-t)or},
{or,-(π/2)*Max[sht3,sht4],(( π)/2)*Max[sht1,sht2]+1/10000},
PlotPoints-> 40,
PlotStyle->Directive[Black,Dashed,Thick]
],

ParametricPlot3D[
{
t*(1+Cos[0])Cos[2(or)],
t*(1+Cos[0])Sin[2(or)]+(1-t)(-or),
2*t*Sin[0]Sin[-or]+(1-t)*0},
{or,π/2-(π/2)*Max[sht1,sht3],π/2+(π/2)*Max[sht2,sht4]+1/10000},
PlotPoints-> 40,
PlotStyle->Directive[Black,Dashed,Thick]
],

Graphics3D [Text[Style["A",Black,25],{
t*(1+Cos[0])Cos[2(0)]+0.15,
t*(1+Cos[0])Sin[2(0)]+(1-t)(-0)+0.15,
2*t*Sin[0]Sin[-0]+(1-t)*0+0.15
}
 ]
],
Graphics3D [Text[Style["C",Black,25],{
t*(1+Cos[0])Cos[2(π)]+0.15,
t*(1+Cos[0])Sin[2(π)]+(1-t)(-π)+0.15,
2*t*Sin[0]Sin[-π]+(1-t)*0+0.15
}]],
Graphics3D [Text[Style["B",Black,25],{
t*(1+Cos[-π])Cos[2(π/2)]+0.15,
t*(1+Cos[-π])Sin[2(π/2)]+(1-t)(-π/2)+0.15,
2*t*Sin[-π]Sin[π/2]+(1-t)*(-π/2)+0.15
}]],
Graphics3D [Text[Style["D",Black,25],{
t*(1+Cos[π])Cos[2(π/2)]+0.15,
t*(1+Cos[π])Sin[2(π/2)]+(1-t)(-π/2)+0.15,
2*t*Sin[π]Sin[π/2]+(1-t)*(π/2)+0.15
}]],

ParametricPlot3D[{
t(1+Cos[2o])Cos[2f] ,
t(1+Cos[2o])Sin[2f]+(1-t)*((-f)*Abs[((π/2-Abs[o])/(π/2))]-Abs[o]),
2t*Sin[2o]Sin[f]+(1-t)o},
{o,0,π/2*sht1+1/10000},
{f,0,π/2},
PlotPoints-> 40,
Mesh->None,
ColorFunction-> "SolarColors"
],

ParametricPlot3D[{
t(1+Cos[2o])Cos[2f] ,
t(1+Cos[2o])Sin[2f]+(1-t)*(-f*Abs[((π/2-Abs[o])/(π/2))]-Abs[o]),
2t*Sin[2o]Sin[f]+(1-t)o},
{o,0,π/2*sht2+1/10000},
{f,π/2*sht2,π*sht2+1/10000},
PlotPoints-> 40,
Mesh->None,
ColorFunction-> "SolarColors"
],

ParametricPlot3D[{
t(1+Cos[2o])Cos[2f] ,
t(1+Cos[2o])Sin[2f]+(1-t)*(-f*Abs[((π/2-Abs[o])/(π/2))]-Abs[o]),
2t*Sin[2o]Sin[f]+(1-t)o},
{o,-π/2*sht3-1/10000,0},
{f,0,π/2*sht3+1/10000},
PlotPoints-> 40,
Mesh->None,
ColorFunction-> "SolarColors"
],

ParametricPlot3D[{
t(1+Cos[2o])Cos[2f] ,
t(1+Cos[2o])Sin[2f]+(1-t)*(-f*Abs[((π/2-Abs[o])/(π/2))]-Abs[o]),
2t*Sin[2o]Sin[f]+(1-t)o},
{o,-π/2*sht4-1/10000,0},
{f,π/2*sht4,π*sht4+1/10000},
PlotPoints-> 40,
Mesh->None,
ColorFunction-> "SolarColors"
]

},

PlotRange->All,
Boxed-> False,
Axes-> False,
ImageSize-> {400,400}
],


{{SHTR1,True,"Убрать 1ый треугольник"},{True,False}},
{{SHTR2,True,"Убрать 2ый треугольник"},{True,False}},
{{SHTR3,True,"Убрать 3ий треугольник"},{True,False}},
{{SHTR4,True,"Убрать 4ый треугольник"},{True,False}},
Delimiter,
Text[Style["Параметр изгибания:",Blue,20]],
{t,0,1},ControlPlacement-> Left
]