// File: 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
subq $0x290, %rsp            # imm = 0x290
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x200(%rbp)
callq 0x10a70
movl $0x3f000000, -0x18(%rbp) # imm = 0x3F000000
movl $0x3f000000, -0x1c(%rbp) # imm = 0x3F000000
movl $0x3f800000, -0x20(%rbp) # imm = 0x3F800000
leaq -0x14(%rbp), %rdi
leaq -0x18(%rbp), %rsi
leaq -0x1c(%rbp), %rdx
leaq -0x20(%rbp), %rcx
callq 0x8c30
jmp 0x481b
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0x44(%rbp), %rcx
callq 0x8c30
jmp 0x4847
movl $0x0, -0x54(%rbp)
movl $0x3f800000, -0x58(%rbp) # imm = 0x3F800000
movl $0x0, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x54(%rbp), %rsi
leaq -0x58(%rbp), %rdx
leaq -0x5c(%rbp), %rcx
callq 0x8c30
jmp 0x4873
leaq -0x8c(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x14(%rbp), %rdx
leaq -0x50(%rbp), %rcx
callq 0xa8f0
jmp 0x488d
movq -0x200(%rbp), %rax
movups -0x8c(%rbp), %xmm0
movups -0x7c(%rbp), %xmm1
movups -0x6c(%rbp), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movl $0x3f800000, -0x9c(%rbp) # imm = 0x3F800000
movl $0x0, -0xa0(%rbp)
movl $0x0, -0xa4(%rbp)
leaq -0x98(%rbp), %rdi
leaq -0x9c(%rbp), %rsi
leaq -0xa0(%rbp), %rdx
leaq -0xa4(%rbp), %rcx
callq 0x8c30
jmp 0x48ef
movl $0x0, -0xb4(%rbp)
movl $0x3f800000, -0xb8(%rbp) # imm = 0x3F800000
movl $0x0, -0xbc(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb4(%rbp), %rsi
leaq -0xb8(%rbp), %rdx
leaq -0xbc(%rbp), %rcx
callq 0x8c30
jmp 0x4930
movl $0x0, -0xcc(%rbp)
movl $0x0, -0xd0(%rbp)
movl $0x3f800000, -0xd4(%rbp) # imm = 0x3F800000
leaq -0xc8(%rbp), %rdi
leaq -0xcc(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
leaq -0xd4(%rbp), %rcx
callq 0x8c30
jmp 0x4971
movl $0x98, %edi
callq 0x31b0
movq %rax, -0x208(%rbp)
jmp 0x4984
movl $0x0, -0xf0(%rbp)
movl $0x0, -0xf4(%rbp)
movl $0x3f800000, -0xf8(%rbp) # imm = 0x3F800000
leaq -0xec(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
leaq -0xf4(%rbp), %rdx
leaq -0xf8(%rbp), %rcx
callq 0x8c30
jmp 0x49c5
movl $0x3f19999a, -0x108(%rbp) # imm = 0x3F19999A
movl $0x0, -0x10c(%rbp)
movl $0x0, -0x110(%rbp)
leaq -0x104(%rbp), %rdi
leaq -0x108(%rbp), %rsi
leaq -0x10c(%rbp), %rdx
leaq -0x110(%rbp), %rcx
callq 0x8c30
jmp 0x4a06
movl $0x0, -0x120(%rbp)
movl $0x3fc00000, -0x124(%rbp) # imm = 0x3FC00000
movl $0x0, -0x128(%rbp)
leaq -0x11c(%rbp), %rdi
leaq -0x120(%rbp), %rsi
leaq -0x124(%rbp), %rdx
leaq -0x128(%rbp), %rcx
callq 0x8c30
jmp 0x4a47
movq -0x208(%rbp), %rdi
movl -0x114(%rbp), %eax
movl %eax, -0x130(%rbp)
movq -0x11c(%rbp), %rax
movq %rax, -0x138(%rbp)
movsd -0x138(%rbp), %xmm0
movss -0x130(%rbp), %xmm1
movl $0x80, %esi
leaq -0xec(%rbp), %rdx
leaq -0x104(%rbp), %rcx
callq 0xcd30
jmp 0x4a92
movq -0x208(%rbp), %rax
movq %rax, -0xe0(%rbp)
movl $0x50, %edi
callq 0x31b0
movq %rax, -0x210(%rbp)
jmp 0x4ab3
movq -0x210(%rbp), %rdi
movl $0x40, %esi
movss 0x12545(%rip), %xmm0    # 0x1700c
movss 0x12541(%rip), %xmm1    # 0x17010
callq 0xd050
jmp 0x4ad6
movq -0x210(%rbp), %rax
movq %rax, -0x140(%rbp)
movl $0x38, %edi
callq 0x31b0
movq %rax, -0x218(%rbp)
jmp 0x4af7
movl $0x0, -0x158(%rbp)
movl $0x0, -0x15c(%rbp)
movl $0x0, -0x160(%rbp)
leaq -0x154(%rbp), %rdi
leaq -0x158(%rbp), %rsi
leaq -0x15c(%rbp), %rdx
leaq -0x160(%rbp), %rcx
callq 0x8c30
jmp 0x4b38
movq -0x218(%rbp), %rdi
leaq -0x154(%rbp), %rsi
movss 0x124b6(%rip), %xmm0    # 0x17004
callq 0xb960
jmp 0x4b55
movq -0x218(%rbp), %rax
movq %rax, -0x148(%rbp)
movl $0x98, %edi
callq 0x31b0
movq %rax, -0x220(%rbp)
jmp 0x4b76
movq -0x220(%rbp), %rdi
movq -0x140(%rbp), %rax
movq 0x38(%rax), %rsi
xorl %edx, %edx
callq 0x11400
jmp 0x4b91
movq -0x220(%rbp), %rax
movq %rax, -0x168(%rbp)
movl $0x98, %edi
callq 0x31b0
movq %rax, -0x228(%rbp)
jmp 0x4bb2
movq -0x228(%rbp), %rdi
movq -0x140(%rbp), %rax
movq 0x38(%rax), %rsi
callq 0x12270
jmp 0x4bcb
movq -0x228(%rbp), %rax
movq %rax, -0x170(%rbp)
movl $0x98, %edi
callq 0x31b0
movq %rax, -0x230(%rbp)
jmp 0x4bec
movq -0x230(%rbp), %rdi
movq -0xe0(%rbp), %rsi
xorl %edx, %edx
callq 0x11400
jmp 0x4c03
movq -0x230(%rbp), %rax
movq %rax, -0x178(%rbp)
movl $0x98, %edi
callq 0x31b0
movq %rax, -0x238(%rbp)
jmp 0x4c24
movq -0x238(%rbp), %rdi
movq -0xe0(%rbp), %rsi
callq 0x12270
jmp 0x4c39
movq -0x238(%rbp), %rax
movq %rax, -0x180(%rbp)
movq -0x178(%rbp), %rax
movb $0x0, 0x3a(%rax)
movq -0x180(%rbp), %rax
movb $0x0, 0x3a(%rax)
movl $0x40, %edi
callq 0x31b0
movq %rax, -0x240(%rbp)
jmp 0x4c70
movq -0x240(%rbp), %rdi
movq -0x140(%rbp), %rax
movq 0x40(%rax), %rsi
callq 0x11ed0
jmp 0x4c89
movq -0x240(%rbp), %rax
movq %rax, -0x188(%rbp)
movl $0x40, %edi
callq 0x31b0
movq %rax, -0x248(%rbp)
jmp 0x4caa
movq -0x248(%rbp), %rdi
movq -0x140(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x11ed0
jmp 0x4cc3
movq -0x248(%rbp), %rax
movq %rax, -0x190(%rbp)
movl $0x0, -0x1a0(%rbp)
movl $0x3f333333, -0x1a4(%rbp) # imm = 0x3F333333
movl $0x0, -0x1a8(%rbp)
leaq -0x19c(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
leaq -0x1a4(%rbp), %rdx
leaq -0x1a8(%rbp), %rcx
callq 0x8c30
jmp 0x4d12
movq -0x188(%rbp), %rax
movl -0x194(%rbp), %ecx
movl %ecx, 0x30(%rax)
movq -0x19c(%rbp), %rcx
movq %rcx, 0x28(%rax)
movl $0x0, -0x1b8(%rbp)
movl $0x3f333333, -0x1bc(%rbp) # imm = 0x3F333333
movl $0x0, -0x1c0(%rbp)
leaq -0x1b4(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
leaq -0x1bc(%rbp), %rdx
leaq -0x1c0(%rbp), %rcx
callq 0x8c30
jmp 0x4d6e
movq -0x190(%rbp), %rax
movl -0x1ac(%rbp), %ecx
movl %ecx, 0x30(%rax)
movq -0x1b4(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq -0x188(%rbp), %rax
movl $0x3d4ccccd, 0x3c(%rax) # imm = 0x3D4CCCCD
movq -0x190(%rbp), %rax
movl $0x3d4ccccd, 0x3c(%rax) # imm = 0x3D4CCCCD
movl $0x98, %edi
callq 0x31b0
movq %rax, -0x250(%rbp)
jmp 0x4db8
movq -0x188(%rbp), %rsi
addq $0x1c, %rsi
movq %rsi, -0x270(%rbp)
movq -0x190(%rbp), %rdi
addq $0x1c, %rdi
callq 0x8d60
movss %xmm1, -0x264(%rbp)
movaps %xmm0, -0x260(%rbp)
jmp 0x4deb
movss -0x264(%rbp), %xmm0
movaps -0x260(%rbp), %xmm1
movlpd %xmm1, -0x1f0(%rbp)
movss %xmm0, -0x1e8(%rbp)
movl -0x1e8(%rbp), %eax
movl %eax, -0x1d8(%rbp)
movq -0x1f0(%rbp), %rax
movq %rax, -0x1e0(%rbp)
leaq -0x1d4(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x8e00
jmp 0x4e39
movq -0x270(%rbp), %rsi
movq -0x250(%rbp), %rdi
movq -0x188(%rbp), %rcx
addq $0x28, %rcx
leaq -0x1d4(%rbp), %rdx
movss 0x121b3(%rip), %xmm0    # 0x17014
callq 0xcaa0
jmp 0x4e68
movq -0x200(%rbp), %rax
movq -0x250(%rbp), %rcx
movq %rcx, -0x1c8(%rbp)
movl $0x4, -0x1f4(%rbp)
addq $0x30, %rax
movq %rax, -0x280(%rbp)
movl $0x38, %edi
callq 0x31b0
movq %rax, -0x278(%rbp)
jmp 0x4ea5
movq -0x278(%rbp), %rdi
movss 0x12154(%rip), %xmm0    # 0x17008
xorl %esi, %esi
callq 0xebb0
jmp 0x4ebd
movq -0x278(%rbp), %rsi
movq -0x280(%rbp), %rdi
callq 0xb660
jmp 0x4ed2
movq -0x200(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x290(%rbp)
movl $0x38, %edi
callq 0x31b0
movq %rax, -0x288(%rbp)
jmp 0x4ef7
movq -0x200(%rbp), %rsi
movq -0x288(%rbp), %rdi
callq 0xf3c0
jmp 0x4f0c
movq -0x288(%rbp), %rsi
movq -0x290(%rbp), %rdi
callq 0xb660
jmp 0x4f21
movq -0x200(%rbp), %rdi
addq $0x30, %rdi
movq -0x178(%rbp), %rsi
callq 0xb660
jmp 0x4f3a
movq -0x200(%rbp), %rdi
addq $0x30, %rdi
movq -0x180(%rbp), %rsi
callq 0xb660
jmp 0x4f53
movq -0x200(%rbp), %rdi
addq $0x30, %rdi
movq -0x148(%rbp), %rsi
callq 0xb660
jmp 0x4f6c
movq -0x200(%rbp), %rdi
addq $0x30, %rdi
movq -0x168(%rbp), %rsi
callq 0xb660
jmp 0x4f85
movq -0x200(%rbp), %rdi
addq $0x30, %rdi
movq -0x170(%rbp), %rsi
callq 0xb660
jmp 0x4f9e
movq -0x200(%rbp), %rdi
addq $0x30, %rdi
movq -0x188(%rbp), %rsi
callq 0xb660
jmp 0x4fb7
movq -0x200(%rbp), %rdi
addq $0x30, %rdi
movq -0x190(%rbp), %rsi
callq 0xb660
jmp 0x4fd0
movq -0x200(%rbp), %rdi
addq $0x30, %rdi
movq -0x1c8(%rbp), %rsi
callq 0xb660
jmp 0x4fe9
addq $0x290, %rsp            # imm = 0x290
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x514e
movq -0x208(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3190
jmp 0x514e
movq -0x210(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3190
jmp 0x514e
movq -0x218(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3190
jmp 0x514e
movq -0x220(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3190
jmp 0x514e
movq -0x228(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3190
jmp 0x514e
movq -0x230(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3190
jmp 0x514e
movq -0x238(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3190
jmp 0x514e
movq -0x240(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3190
jmp 0x514e
movq -0x248(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3190
jmp 0x514e
movq -0x250(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3190
jmp 0x514e
movq -0x278(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3190
jmp 0x514e
movq -0x288(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3190
movq -0x200(%rbp), %rdi
callq 0x8cc0
movq -0x28(%rbp), %rdi
callq 0x3280
nopw %cs:(%rax,%rax)