// File: /workspace/github_cpp_makefile_star2_O3/carlos-urena[P]svg-gen/figures.cpp
// Function: Figure4_EllipseSectorZ::Figure4_EllipseSectorZ()
Figure4_EllipseSectorZ::Figure4_EllipseSectorZ()
{
  vec3 observador = vec3(0.5,0.5,1.0), //vec3(0.9,0.5,1.0),
       lookat     = vec3(0.0,0.0,0.0),
       vup        = vec3(0.0,1.0,0.0);

  cam = Camera( lookat, observador, vup );

  // elipse plana tangente (perp. al eje Z, con eje mayor Y y eje menor X)
  const vec3 ejex = vec3(1.0,0.0,0.0),
             ejey = vec3(0.0,1.0,0.0),
             ejez = vec3(0.0,0.0,1.0);

  Ellipse * pell = new Ellipse( 128, vec3(0.0,0.0,1.0), vec3(0.6,0.0,0.0), vec3(0.0,1.5,0.0));

  EllipseSectorZ * peZ = new EllipseSectorZ( 64, real(0.6), real(1.5) );

  // esfera con relleno de gradiente radial
  Sphere * pes2D = new Sphere( vec3(0.0,0.0,0.0), 1.0 );

  // region
  SpherePolygon *    pesf  = new SpherePolygon( *(peZ->ppol) );
  YCylinderPolygon * pcy   = new YCylinderPolygon( *(peZ->ppol) );

  // polilineas proyecciones de la elipse completas, no rellenas
  SpherePolygon *    pellesf  = new SpherePolygon( *pell );
  YCylinderPolygon * pellcy   = new YCylinderPolygon( *pell );
  pellesf->style.draw_filled = false ;
  pellcy->style.draw_filled = false ;

  // points
  YCylinderPoint * ppun0 = new YCylinderPoint( *(peZ->ppun0)),
                   * ppun1 = new YCylinderPoint( *(peZ->ppun1));


  ppun0->color = vec3( 0.0, 0.7, 0.0 );
  ppun1->color = vec3( 0.0, 0.7, 0.0 );
  ppun0->radius = 0.05 ;
  ppun1->radius = 0.05 ;

  // segmento verde entre los points:
  Segment * segmv = new Segment( ppun0->pos3D, ppun1->pos3D - ppun0->pos3D,
                                ppun0->color, 0.025 );

  //añadir objetos
  const int cadacuantos = 4 ;

  objetos.add( new Axes( 0.010 ));
  objetos.add( new YAxisCylinder( cam ) );

  objetos.add( pellesf );
  objetos.add( pellcy );
  objetos.add( pes2D );
  objetos.add( pesf );
  objetos.add( pcy );
  objetos.add( ppun0 );
  objetos.add( ppun1 );
  objetos.add( segmv );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
callq 0xa414
movabsq $0x3f0000003f000000, %rax # imm = 0x3F0000003F000000
leaq -0xb8(%rbp), %rdx
movq %rax, (%rdx)
movl $0x3f800000, 0x8(%rdx)  # imm = 0x3F800000
leaq -0xac(%rbp), %rsi
movq $0x0, (%rsi)
xorl %eax, %eax
movl %eax, 0x8(%rsi)
movabsq $0x3f80000000000000, %rdi # imm = 0x3F80000000000000
leaq -0xa0(%rbp), %rcx
movq %rdi, (%rcx)
movl %eax, 0x8(%rcx)
leaq -0x88(%rbp), %rdi
movq %rbx, -0x40(%rbp)
callq 0x6c30
movups -0x88(%rbp), %xmm0
movups -0x78(%rbp), %xmm1
movups -0x68(%rbp), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movl $0x98, %edi
callq 0x31d0
movq %rax, %r15
leaq -0x88(%rbp), %rdx
movq $0x0, (%rdx)
movl $0x3f800000, 0x8(%rdx)  # imm = 0x3F800000
leaq -0x94(%rbp), %rcx
movq $0x3f19999a, (%rcx)     # imm = 0x3F19999A
movl $0x0, 0x8(%rcx)
movsd 0x9254(%rip), %xmm0     # 0xd040
xorps %xmm1, %xmm1
movq %rax, %rdi
movl $0x80, %esi
callq 0x8586
movl $0x50, %edi
callq 0x31d0
movq %rax, %rbx
movss 0x91ff(%rip), %xmm0     # 0xd010
movss 0x91fb(%rip), %xmm1     # 0xd014
movq %rax, %rdi
movl $0x40, %esi
callq 0x87a4
movl $0x38, %edi
callq 0x31d0
movq %rax, %r14
leaq -0x88(%rbp), %rsi
movq $0x0, (%rsi)
movl $0x0, 0x8(%rsi)
movss 0x91b8(%rip), %xmm0     # 0xd008
movq %rax, %rdi
callq 0x76c8
movl $0x98, %edi
callq 0x31d0
movq %rax, %r13
movq 0x38(%rbx), %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0xa96a
movl $0x98, %edi
callq 0x31d0
movq 0x38(%rbx), %rsi
movq %rax, -0x50(%rbp)
movq %rax, %rdi
callq 0xb24e
movl $0x98, %edi
callq 0x31d0
movq %rax, -0x38(%rbp)
movq %rax, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xa96a
movl $0x98, %edi
callq 0x31d0
movq %rax, %r12
movq %r13, -0x58(%rbp)
movq %r14, -0x30(%rbp)
movq %rax, %rdi
movq %r15, %rsi
callq 0xb24e
xorl %eax, %eax
movq -0x38(%rbp), %rcx
movb %al, 0x3a(%rcx)
movb %al, 0x3a(%r12)
movl $0x40, %edi
callq 0x31d0
movq %rax, %r13
movq 0x40(%rbx), %rsi
movq %rax, %rdi
callq 0xb128
movl $0x40, %edi
callq 0x31d0
movq %rax, %r15
movq 0x48(%rbx), %rsi
movq %rax, %rdi
callq 0xb128
movabsq $0x3f33333300000000, %rax # imm = 0x3F33333300000000
movq %rax, 0x28(%r13)
xorl %ecx, %ecx
movl %ecx, 0x30(%r13)
movq %rax, 0x28(%r15)
movl %ecx, 0x30(%r15)
movl $0x3d4ccccd, %eax       # imm = 0x3D4CCCCD
movl %eax, 0x3c(%r13)
movl %eax, 0x3c(%r15)
movl $0x98, %edi
callq 0x31d0
leaq 0x28(%r13), %rcx
movq %r13, %rsi
addq $0x1c, %rsi
movl $0x7, %edx
movss (%r15,%rdx,4), %xmm0
subss (%r13,%rdx,4), %xmm0
movss %xmm0, -0xa4(%rbp,%rdx,4)
incq %rdx
cmpq $0xa, %rdx
jne 0x3f4b
movsd -0x88(%rbp), %xmm0
movss -0x80(%rbp), %xmm1
leaq -0x94(%rbp), %rdx
movss %xmm0, (%rdx)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm0, 0x4(%rdx)
movss %xmm1, 0x8(%rdx)
movss 0x9080(%rip), %xmm0     # 0xd018
movq %rax, -0x48(%rbp)
movq %rax, %rdi
callq 0x82c8
movl $0x38, %edi
callq 0x31d0
movq %rax, %r14
movss 0x9053(%rip), %xmm0     # 0xd00c
movq %rax, %rdi
xorl %esi, %esi
callq 0x976c
movq -0x40(%rbp), %rax
leaq 0x30(%rax), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7554
movl $0x38, %edi
callq 0x31d0
movq %rax, %r14
movq %rax, %rdi
movq -0x40(%rbp), %rsi
callq 0x9b66
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7554
movq %rbx, %rdi
movq -0x38(%rbp), %rsi
callq 0x7554
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7554
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
callq 0x7554
movq %rbx, %rdi
movq -0x58(%rbp), %rsi
callq 0x7554
movq %rbx, %rdi
movq -0x50(%rbp), %rsi
callq 0x7554
movq %rbx, %rdi
movq %r13, %rsi
callq 0x7554
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7554
movq %rbx, %rdi
movq -0x48(%rbp), %rsi
callq 0x7554
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x40af
jmp 0x40af
movq %rax, -0x30(%rbp)
movq -0x48(%rbp), %rdi
jmp 0x40cc
jmp 0x40d7
jmp 0x40c5
jmp 0x40d7
jmp 0x40a4
jmp 0x40d7
movq %rax, -0x30(%rbp)
movq %r12, %rdi
jmp 0x40cc
jmp 0x40d7
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rdi
jmp 0x40cc
jmp 0x40d7
movq %rax, -0x30(%rbp)
movq -0x50(%rbp), %rdi
jmp 0x40cc
jmp 0x40d7
movq %rax, -0x30(%rbp)
movq %r13, %rdi
jmp 0x40cc
jmp 0x40d7
movq %rax, -0x30(%rbp)
movq %r14, %rdi
jmp 0x40cc
jmp 0x40d7
movq %rax, -0x30(%rbp)
movq %rbx, %rdi
jmp 0x40cc
jmp 0x40d7
movq %rax, -0x30(%rbp)
movq %r15, %rdi
callq 0x31a0
jmp 0x40db
jmp 0x40d7
jmp 0x40d7
movq %rax, -0x30(%rbp)
movq -0x40(%rbp), %rbx
leaq 0x70(%rbx), %rdi
callq 0x5d8c
addq $0x30, %rbx
movq %rbx, %rdi
callq 0xbb8e
movq -0x30(%rbp), %rdi
callq 0x32b0
nop