// File: /workspace/github_cpp_makefile_star2_O1/carlos-urena[P]svg-gen/figures.cpp
// Function: Figure5_EllipseSectorRadial::Figure5_EllipseSectorRadial()
Figure5_EllipseSectorRadial::Figure5_EllipseSectorRadial()
{
  vec3 observador = vec3(0.7,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);

  const int nump = 256 ;
  //Ellipse * pe = new Ellipse( nump, vec3(0.0,0.0,1.0), real(0.6)*ejex, real(1.5)*ejey );
  const real lonx = 0.8 , lony = 3.0 ;

  Ellipse *             pe    = new Ellipse( nump, vec3(0.0,0.0,1.0), lonx*ejex, lony*ejey );
  EllipseSectorRadial * pser  = new EllipseSectorRadial( nump*3, lonx, lony );
  Sphere *              pes2D = new Sphere( vec3(0.0,0.0,0.0), 1.0 );
  SpherePolygon *       pesf  = new SpherePolygon( *pe );
  ZCylinderPolygon *    pcz   = new ZCylinderPolygon( *pe );

  pesf->style.draw_filled = false ;
  pcz->style.draw_filled = false ;

  //
  SpherePolygon *    pseresf  = new SpherePolygon( *(pser->ppol) );
  ZCylinderPolygonWithSector * psercil
       = new ZCylinderPolygonWithSector( *(pser->ppol), pser->alpha0, pser->alpha1, pser->lonX, pser->lonY );

  pseresf->style.draw_filled = true ;
  psercil->style.draw_filled = true ;

  // circunferencia delantera del cilindro
  Ellipse * cd = new Ellipse( nump, vec3(0.0,0.0,1.0), ejex, ejey );
  cd->style.draw_filled = false ;
  cd->style.draw_lines  = true ;
  cd->style.lines_color = vec3(1.0,0.0,0.0);
  cd->style.lines_width = 0.015 ;

  // points, sacados del sector de elipse radial
  Point * ppoint0 = new Point( pser->point0, vec3(0.0,0.7,0.0) ),
        * ppoint1 = new Point( pser->point1, vec3(0.0,0.7,0.0) );

  ppoint0->radius = 0.05 ;
  ppoint1->radius = 0.05 ;

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

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

  objetos.add( new Axes( 0.010 ) );
  objetos.add( new ZAxisCylinder( cam ) );
  objetos.add( pes2D );
  objetos.add( pesf );
  objetos.add( pcz );
  objetos.add( cd );
  objetos.add( pseresf );
  objetos.add( psercil );
  objetos.add( ppoint0 );
  objetos.add( ppoint1 );
  objetos.add( segmv );

  // cilindro

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %r15
callq 0xa55a
movabsq $0x3f0000003f333333, %rax # imm = 0x3F0000003F333333
leaq -0xec(%rbp), %rdx
movq %rax, (%rdx)
movl $0x3f800000, 0x8(%rdx)  # imm = 0x3F800000
leaq -0xe0(%rbp), %rsi
movq $0x0, (%rsi)
xorl %ebx, %ebx
movl %ebx, 0x8(%rsi)
movabsq $0x3f80000000000000, %r14 # imm = 0x3F80000000000000
leaq -0xd4(%rbp), %rcx
movq %r14, (%rcx)
movl %ebx, 0x8(%rcx)
leaq -0xa8(%rbp), %rdi
movq %r15, -0x48(%rbp)
callq 0x6c14
movups -0xa8(%rbp), %xmm0
movups -0x98(%rbp), %xmm1
movups -0x88(%rbp), %xmm2
movups %xmm2, 0x20(%r15)
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
movq $0x3f800000, -0x78(%rbp) # imm = 0x3F800000
movl %ebx, -0x70(%rbp)
movq %r14, -0x60(%rbp)
movl %ebx, -0x58(%rbp)
movl $0x98, %edi
callq 0x31d0
movq %rax, %rbx
movq $0x0, -0x6c(%rbp)
movl $0x3f800000, -0x64(%rbp) # imm = 0x3F800000
xorl %eax, %eax
movss 0x8e52(%rip), %xmm0     # 0xd01c
movss -0x78(%rbp,%rax,4), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, -0xa8(%rbp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x41ca
movsd -0xa8(%rbp), %xmm0
movss -0xa0(%rbp), %xmm1
movsd %xmm0, -0xc8(%rbp)
movss %xmm1, -0xc0(%rbp)
xorl %eax, %eax
movss 0x8e10(%rip), %xmm0     # 0xd020
movss -0x60(%rbp,%rax,4), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, -0xa8(%rbp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x4210
movsd -0xa8(%rbp), %xmm0
movss -0xa0(%rbp), %xmm1
leaq -0x6c(%rbp), %rdx
leaq -0xc8(%rbp), %rcx
movq %rbx, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x8636
movl $0x78, %edi
callq 0x31d0
movq %rax, %r12
movss 0x8db3(%rip), %xmm0     # 0xd01c
movss 0x8daf(%rip), %xmm1     # 0xd020
movq %rax, %rdi
movl $0x300, %esi            # imm = 0x300
callq 0x8e7c
movl $0x38, %edi
callq 0x31d0
movq %rax, %r14
leaq -0xa8(%rbp), %rsi
movq $0x0, (%rsi)
movl $0x0, 0x8(%rsi)
movss 0x8d60(%rip), %xmm0     # 0xd008
movq %rax, %rdi
callq 0x76dc
movl $0x98, %edi
callq 0x31d0
movq %rax, -0x40(%rbp)
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xab36
movl $0x98, %edi
callq 0x31d0
movq %rax, %r13
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb652
xorl %eax, %eax
movq -0x40(%rbp), %rcx
movb %al, 0x3a(%rcx)
movq %r13, -0x30(%rbp)
movb %al, 0x3a(%r13)
movl $0x98, %edi
callq 0x31d0
movq 0x38(%r12), %rsi
movq %rax, -0x38(%rbp)
movq %rax, %rdi
xorl %edx, %edx
callq 0xab36
movl $0x98, %edi
callq 0x31d0
movq 0x38(%r12), %rsi
movss 0x50(%r12), %xmm0
movss 0x54(%r12), %xmm1
movss 0x58(%r12), %xmm2
movss 0x5c(%r12), %xmm3
movq %rax, %rbx
movq %rax, %rdi
callq 0xb85e
movb $0x1, %al
movq -0x38(%rbp), %rcx
movb %al, 0x3a(%rcx)
movq %rbx, -0xb8(%rbp)
movb %al, 0x3a(%rbx)
movl $0x98, %edi
callq 0x31d0
movq %rax, %rbx
leaq -0xa8(%rbp), %rdx
movq $0x0, (%rdx)
movl $0x3f800000, 0x8(%rdx)  # imm = 0x3F800000
movsd -0x60(%rbp), %xmm0
leaq -0x78(%rbp), %rcx
xorps %xmm1, %xmm1
movq %rax, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x8636
movb $0x0, 0x3a(%rbx)
movb $0x1, 0x38(%rbx)
movq $0x3f800000, 0x20(%rbx) # imm = 0x3F800000
movl $0x0, 0x28(%rbx)
movl $0x3c75c28f, 0x3c(%rbx) # imm = 0x3C75C28F
movl $0x40, %edi
callq 0x31d0
movq %rax, %r15
movsd 0x60(%r12), %xmm0
movss 0x68(%r12), %xmm1
movsd 0x8c7a(%rip), %xmm2     # 0xd050
xorps %xmm3, %xmm3
movq %rax, %rdi
callq 0x6f3a
movl $0x40, %edi
callq 0x31d0
movq %rax, %r13
movsd 0x6c(%r12), %xmm0
movss 0x74(%r12), %xmm1
movsd 0x8c4c(%rip), %xmm2     # 0xd050
xorps %xmm3, %xmm3
movq %rax, %rdi
callq 0x6f3a
movl $0x3d4ccccd, %eax       # imm = 0x3D4CCCCD
movl %eax, 0x3c(%r15)
movl %eax, 0x3c(%r13)
movl $0x98, %edi
callq 0x31d0
leaq 0x1c(%r15), %rsi
movl $0x7, %ecx
movss (%r13,%rcx,4), %xmm0
subss (%r15,%rcx,4), %xmm0
movss %xmm0, -0xc4(%rbp,%rcx,4)
incq %rcx
cmpq $0xa, %rcx
jne 0x442f
movq %r14, -0xb0(%rbp)
movsd -0xa8(%rbp), %xmm0
movss -0xa0(%rbp), %xmm1
leaq -0x6c(%rbp), %rdx
movss %xmm0, (%rdx)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm0, 0x4(%rdx)
movss %xmm1, 0x8(%rdx)
movq %r15, %rcx
addq $0x28, %rcx
movss 0x8b8e(%rip), %xmm0     # 0xd018
movq %rax, -0x50(%rbp)
movq %rax, %rdi
callq 0x8322
movl $0x38, %edi
callq 0x31d0
movq %rax, %r12
movss 0x8b61(%rip), %xmm0     # 0xd00c
movq %rax, %rdi
xorl %esi, %esi
callq 0x987a
movq -0x48(%rbp), %rax
leaq 0x30(%rax), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x7568
movl $0x38, %edi
callq 0x31d0
movq %rax, %r12
movq %rax, %rdi
movq -0x48(%rbp), %rsi
callq 0x9ffa
movq %r14, %rdi
movq %r12, %rsi
callq 0x7568
movq %r14, %rdi
movq -0xb0(%rbp), %rsi
callq 0x7568
movq %r14, %rdi
movq -0x40(%rbp), %rsi
callq 0x7568
movq %r14, %rdi
movq -0x30(%rbp), %rsi
callq 0x7568
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7568
movq %r14, %rdi
movq -0x38(%rbp), %rsi
callq 0x7568
movq %r14, %rdi
movq -0xb8(%rbp), %rsi
callq 0x7568
movq %r14, %rdi
movq %r15, %rsi
callq 0x7568
movq %r14, %rdi
movq %r13, %rsi
callq 0x7568
movq %r14, %rdi
movq -0x50(%rbp), %rsi
callq 0x7568
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x45c2
jmp 0x45c2
movq %rax, -0x30(%rbp)
movq -0x50(%rbp), %rdi
jmp 0x45d4
jmp 0x45df
jmp 0x45a0
jmp 0x45df
movq %rax, -0x30(%rbp)
movq %r15, %rdi
jmp 0x45d4
jmp 0x45df
jmp 0x45cd
jmp 0x45df
jmp 0x45cd
jmp 0x45df
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rdi
jmp 0x45d4
jmp 0x45df
movq %rax, -0x30(%rbp)
movq %r13, %rdi
jmp 0x45d4
jmp 0x45df
movq %rax, -0x30(%rbp)
movq -0x40(%rbp), %rdi
jmp 0x45d4
jmp 0x45df
movq %rax, -0x30(%rbp)
movq %r14, %rdi
jmp 0x45d4
jmp 0x45df
movq %rax, -0x30(%rbp)
movq %r12, %rdi
jmp 0x45d4
jmp 0x45df
movq %rax, -0x30(%rbp)
movq %rbx, %rdi
callq 0x31a0
jmp 0x45e3
jmp 0x45df
jmp 0x45df
movq %rax, -0x30(%rbp)
movq -0x48(%rbp), %rbx
leaq 0x70(%rbx), %rdi
callq 0x5d78
addq $0x30, %rbx
movq %rbx, %rdi
callq 0xbe42
movq -0x30(%rbp), %rdi
callq 0x32b0
nop