// File: /workspace/github_cpp_makefile_star2_O2/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 $0xb8, %rsp
movq %rdi, %r14
callq 0x8796
movabsq $0x3f0000003f333333, %rax # imm = 0x3F0000003F333333
leaq -0xd0(%rbp), %rsi
andq $0x0, (%rsi)
leaq -0xdc(%rbp), %rdx
andl $0x0, 0x8(%rsi)
movq %rax, (%rdx)
movl $0x3f800000, 0x8(%rdx)  # imm = 0x3F800000
movabsq $0x3f80000000000000, %rbx # imm = 0x3F80000000000000
leaq -0xc4(%rbp), %rcx
movq %rbx, (%rcx)
andl $0x0, 0x8(%rcx)
leaq -0xb8(%rbp), %rdi
movq %r14, -0x48(%rbp)
callq 0x5f0c
movups -0xb8(%rbp), %xmm0
movups -0xa8(%rbp), %xmm1
movups -0x98(%rbp), %xmm2
movups %xmm2, 0x20(%r14)
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movq $0x3f800000, -0xb8(%rbp) # imm = 0x3F800000
andl $0x0, -0xb0(%rbp)
movq %rbx, -0x60(%rbp)
andl $0x0, -0x58(%rbp)
movl $0x98, %edi
callq 0x31b0
movq %rax, %rbx
andq $0x0, -0x54(%rbp)
movl $0x3f800000, -0x4c(%rbp) # imm = 0x3F800000
movss 0x703a(%rip), %xmm0     # 0xb01c
leaq -0xb8(%rbp), %rdi
callq 0x52f1
movlps %xmm0, -0x88(%rbp)
movss %xmm1, -0x80(%rbp)
movss 0x701e(%rip), %xmm0     # 0xb020
leaq -0x60(%rbp), %rdi
callq 0x52f1
leaq -0x54(%rbp), %rdx
leaq -0x88(%rbp), %rcx
movq %rbx, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x70d6
pushq $0x78
popq %rdi
callq 0x31b0
movq %rax, %r12
movss 0x6fe6(%rip), %xmm0     # 0xb01c
movss 0x6fe2(%rip), %xmm1     # 0xb020
movq %rax, %rdi
movl $0x300, %esi            # imm = 0x300
callq 0x766a
pushq $0x38
popq %rdi
callq 0x31b0
movq %rax, %r15
leaq -0x54(%rbp), %rsi
andq $0x0, (%rsi)
andl $0x0, 0x8(%rsi)
movss 0x6f9e(%rip), %xmm0     # 0xb008
movq %rax, %rdi
callq 0x67a0
movl $0x98, %edi
callq 0x31b0
movq %rax, -0x40(%rbp)
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x8b4a
movl $0x98, %edi
callq 0x31b0
movq %rax, %r13
movq %rax, %rdi
movq %rbx, %rsi
callq 0x920a
xorl %eax, %eax
movq -0x40(%rbp), %rcx
movb %al, 0x3a(%rcx)
movq %r13, -0x78(%rbp)
movb %al, 0x3a(%r13)
movl $0x98, %edi
callq 0x31b0
movq 0x38(%r12), %rsi
movq %rax, -0x38(%rbp)
movq %rax, %rdi
xorl %edx, %edx
callq 0x8b4a
movl $0x98, %edi
callq 0x31b0
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 0x9334
movb $0x1, %al
movq -0x38(%rbp), %rcx
movb %al, 0x3a(%rcx)
movq %rbx, -0x68(%rbp)
movb %al, 0x3a(%rbx)
movl $0x98, %edi
callq 0x31b0
movq %rax, %rbx
movq %r15, -0x70(%rbp)
leaq -0x54(%rbp), %rdx
andq $0x0, (%rdx)
movl $0x3f800000, 0x8(%rdx)  # imm = 0x3F800000
movsd -0x60(%rbp), %xmm0
movss -0x58(%rbp), %xmm1
leaq -0xb8(%rbp), %rcx
movq %rax, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x70d6
movb $0x0, 0x3a(%rbx)
movb $0x1, 0x38(%rbx)
movq $0x3f800000, 0x20(%rbx) # imm = 0x3F800000
andl $0x0, 0x28(%rbx)
movl $0x3c75c28f, 0x3c(%rbx) # imm = 0x3C75C28F
pushq $0x40
popq %rdi
callq 0x31b0
movq %rax, %r15
movsd 0x60(%r12), %xmm0
movss 0x68(%r12), %xmm1
movsd 0x6ebd(%rip), %xmm2     # 0xb050
xorps %xmm3, %xmm3
movq %rax, %rdi
callq 0x6190
pushq $0x40
popq %rdi
callq 0x31b0
movq %rax, %r13
movsd 0x6c(%r12), %xmm0
movss 0x74(%r12), %xmm1
movsd 0x6e91(%rip), %xmm2     # 0xb050
xorps %xmm3, %xmm3
movq %rax, %rdi
callq 0x6190
movl $0x3d4ccccd, %eax       # imm = 0x3D4CCCCD
movl %eax, 0x3c(%r15)
movl %eax, 0x3c(%r13)
movl $0x98, %edi
callq 0x31b0
movq %rax, -0x30(%rbp)
leaq 0x1c(%r15), %r14
movq %r13, %rdi
addq $0x1c, %rdi
movq %r14, %rsi
callq 0x530c
leaq -0x54(%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 0x6dfb(%rip), %xmm0     # 0xb018
movq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x6f22
pushq $0x38
popq %rdi
callq 0x31b0
movq %rax, %r12
movss 0x6dd0(%rip), %xmm0     # 0xb00c
movq %rax, %rdi
xorl %esi, %esi
callq 0x7ca0
movq -0x48(%rbp), %rax
leaq 0x30(%rax), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x664c
pushq $0x38
popq %rdi
callq 0x31b0
movq %rax, %r12
movq %rax, %rdi
movq -0x48(%rbp), %rsi
callq 0x830c
movq %r14, %rdi
movq %r12, %rsi
callq 0x664c
movq %r14, %rdi
movq -0x70(%rbp), %rsi
callq 0x664c
movq %r14, %rdi
movq -0x40(%rbp), %rsi
callq 0x664c
movq %r14, %rdi
movq -0x78(%rbp), %rsi
callq 0x664c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x664c
movq %r14, %rdi
movq -0x38(%rbp), %rsi
callq 0x664c
movq %r14, %rdi
movq -0x68(%rbp), %rsi
callq 0x664c
movq %r14, %rdi
movq %r15, %rsi
callq 0x664c
movq %r14, %rdi
movq %r13, %rsi
callq 0x664c
movq %r14, %rdi
movq -0x30(%rbp), %rsi
callq 0x664c
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4336
jmp 0x4336
jmp 0x435a
jmp 0x4317
jmp 0x435a
jmp 0x432c
jmp 0x435a
jmp 0x434d
jmp 0x435a
jmp 0x434d
jmp 0x435a
movq %rax, %r14
movq -0x38(%rbp), %rdi
jmp 0x4353
jmp 0x435a
movq %rax, %r14
movq %r13, %rdi
jmp 0x4353
jmp 0x435a
movq %rax, %r14
movq -0x40(%rbp), %rdi
jmp 0x4353
jmp 0x435a
movq %rax, %r14
movq %r15, %rdi
jmp 0x4353
jmp 0x435a
movq %rax, %r14
movq %r12, %rdi
jmp 0x4353
jmp 0x435a
jmp 0x435a
jmp 0x435a
movq %rax, %r14
movq -0x30(%rbp), %rdi
jmp 0x4353
movq %rax, %r14
movq %rbx, %rdi
callq 0x3190
jmp 0x435d
movq %rax, %r14
movq -0x48(%rbp), %rdi
callq 0x53e4
movq %r14, %rdi
callq 0x3250