Circles - a geometric drawing example

Circles - a geometric drawing example

Postby Antonio Linares » Thu Jan 03, 2019 3:44 pm

circles.prg
Code: Select all  Expand view  RUN
#include "FiveWin.ch"

function Main()

   local oPrn, oPen1, oPen2
   local nX := 2500, nY := 2000
   
   DEFINE PEN oPen1 WIDTH 15
   DEFINE PEN oPen2 WIDTH  7

   PRINTER oPrn PREVIEW
      PAGE
         oPrn:Ellipse( nY - 1500, nX - 1500, nY + 1500, nX + 1500, oPen1 ) // External circle
         oPrn:Line( nY - 50, nX, nY + 50, nX, oPen2 )  // Vertical
         oPrn:Line( nY, nX - 50, nY, nX + 50, oPen2 )  // Horizontal
         oPrn:Line( nY, nX, nY, nX + 1500, oPen2 )     // Right radio
      ENDPAGE
   ENDPRINTER
   
   oPen1:End()
   oPen2:End()

return nil


Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Circles - a geometric drawing example

Postby Antonio Linares » Thu Jan 03, 2019 4:43 pm

Painting the radius with different angles

circles.prg
Code: Select all  Expand view  RUN
#include "FiveWin.ch"

#define PI  3.14159265358979323846

function Main()

   local oPrn, oPen1, oPen2
   local nX := 2500, nY := 2000
   local nRadius := 1500, nAngle
   local nAnglesToRadians := PI / 180
   
   DEFINE PEN oPen1 WIDTH 15
   DEFINE PEN oPen2 WIDTH  7

   PRINTER oPrn PREVIEW
      PAGE
         oPrn:Ellipse( nY - nRadius, nX - nRadius, nY + nRadius, nX + nRadius, oPen1 ) // External circle
         oPrn:Line( nY - 50, nX, nY + 50, nX, oPen2 )  // Vertical
         oPrn:Line( nY, nX - 50, nY, nX + 50, oPen2 )  // Horizontal
         oPrn:Line( nY, nX, nY, nX + nRadius, oPen2 )  // Right radio
         
         for nAngle = 0 to 360 step 30
            oPrn:Line( nY, nX, nY - nRadius * sin( nAngle * nAnglesToRadians ), nX + nRadius * cos( nAngle * nAnglesToRadians ), oPen2 )
         next
      ENDPAGE
   ENDPRINTER
   
   oPen1:End()
   oPen2:End()

return nil


Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Circles - a geometric drawing example

Postby Antonio Linares » Thu Jan 03, 2019 8:19 pm

Mandala :-)

circles.prg
Code: Select all  Expand view  RUN
#include "FiveWin.ch"

#define PI  3.14159265358979323846

function Main()

   local oPrn, oPen1, oPen2
   local nX := 2500, nY := 2000
   local nRadius := 1500, nRadius2 := 1300, nRadius3 := 600, nAngle
   local nAnglesToRadians := PI / 180
   
   DEFINE PEN oPen1 WIDTH 15
   DEFINE PEN oPen2 WIDTH  7 STYLE 3

   PRINTER oPrn PREVIEW
      PAGE
         oPrn:Ellipse( nY - nRadius, nX - nRadius, nY + nRadius, nX + nRadius, oPen1 ) // External circle
         oPrn:Ellipse( nY - nRadius2, nX - nRadius2, nY + nRadius2, nX + nRadius2, oPen2 ) // Inner circle
         oPrn:Ellipse( nY - nRadius3, nX - nRadius3, nY + nRadius3, nX + nRadius3, oPen2 ) // Inner2 circle
         oPrn:Line( nY - 50, nX, nY + 50, nX, oPen2 )  // Vertical
         oPrn:Line( nY, nX - 50, nY, nX + 50, oPen2 )  // Horizontal
         oPrn:Line( nY, nX, nY, nX + nRadius, oPen2 )  // Right radio
         
         for nAngle = 0 to 360 step 30
            oPrn:Line( nY, nX, nY - nRadius * sin( nAngle * nAnglesToRadians ), nX + nRadius * cos( nAngle * nAnglesToRadians ), oPen2 )
         next
         
         for nAngle = 0 to 360 step 10
            if Mod( nAngle, 30 ) != 0
               oPrn:Ellipse( nY - nRadius2 * sin( nAngle * nAnglesToRadians ) - 30, nX + nRadius2 * cos( nAngle * nAnglesToRadians ) - 30,;
                             nY - nRadius2 * sin( nAngle * nAnglesToRadians ) + 30, nX + nRadius2 * cos( nAngle * nAnglesToRadians ) + 30, oPen1 )
            endif
         next

         for nAngle = 0 to 360 step 15
            if Mod( nAngle, 2 ) != 0
               oPrn:Ellipse( nY - nRadius3 * sin( nAngle * nAnglesToRadians ) - 30, nX + nRadius3 * cos( nAngle * nAnglesToRadians ) - 30,;
                             nY - nRadius3 * sin( nAngle * nAnglesToRadians ) + 30, nX + nRadius3 * cos( nAngle * nAnglesToRadians ) + 30, oPen1 )
            endif
         next

      ENDPAGE
   ENDPRINTER
   
   oPen1:End()
   oPen2:End()

return nil


Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Circles - a geometric drawing example

Postby Antonio Linares » Fri Jan 04, 2019 10:00 am

Dimensions

circles.prg
Code: Select all  Expand view  RUN
#include "FiveWin.ch"

#define PI  3.14159265358979323846

function Main()

   local oPrn, oPen1, oPen2
   local nX := 2500, nY := 2000
   local nRadius := 1500, nRadius2 := 1300, nRadius3 := 700, nRadius4 := 315, nAngle
   local nAnglesToRadians := PI / 180
   local oFont1
   
   DEFINE PEN oPen1 WIDTH 15
   DEFINE PEN oPen2 WIDTH  7 STYLE 3

   PRINTER oPrn PREVIEW
   
      DEFINE FONT oFont1 NAME "Verdana" SIZE 0, -12 OF oPrn
   
      PAGE
         oPrn:Ellipse( nY - nRadius, nX - nRadius, nY + nRadius, nX + nRadius, oPen1 ) // External circle
         oPrn:Ellipse( nY - nRadius2, nX - nRadius2, nY + nRadius2, nX + nRadius2, oPen2 ) // Inner circle
         oPrn:Ellipse( nY - nRadius3, nX - nRadius3, nY + nRadius3, nX + nRadius3, oPen2 ) // Inner2 circle
         oPrn:Ellipse( nY - nRadius4, nX - nRadius4, nY + nRadius4, nX + nRadius4, oPen1 ) // Inner3 circle
         
         oPrn:Line( nY - 50, nX, nY + 50, nX, oPen2 )  // Vertical
         oPrn:Line( nY, nX - 50, nY, nX + 50, oPen2 )  // Horizontal
         oPrn:Line( nY, nX, nY, nX + nRadius, oPen2 )  // Right radio
         
         for nAngle = 0 to 360 step 30
            oPrn:Line( nY, nX, nY - nRadius * sin( nAngle * nAnglesToRadians ), nX + nRadius * cos( nAngle * nAnglesToRadians ), oPen2 )
         next
         
         for nAngle = 0 to 360 step 10
            if Mod( nAngle, 30 ) != 0
               oPrn:Ellipse( nY - nRadius2 * sin( nAngle * nAnglesToRadians ) - 40, nX + nRadius2 * cos( nAngle * nAnglesToRadians ) - 40,;
                             nY - nRadius2 * sin( nAngle * nAnglesToRadians ) + 40, nX + nRadius2 * cos( nAngle * nAnglesToRadians ) + 40, oPen1 )
            endif
         next

         for nAngle = 0 to 360 step 15
            if Mod( nAngle, 2 ) != 0
               oPrn:Ellipse( nY - nRadius3 * sin( nAngle * nAnglesToRadians ) - 40, nX + nRadius3 * cos( nAngle * nAnglesToRadians ) - 40,;
                             nY - nRadius3 * sin( nAngle * nAnglesToRadians ) + 40, nX + nRadius3 * cos( nAngle * nAnglesToRadians ) + 40, oPen1 )
            endif
         next
         
         oPrn:Line( nY, nX - nRadius, nY + nRadius + 800, nX - nRadius, oPen2 )
         oPrn:Line( nY, nX + nRadius, nY + nRadius + 800, nX + nRadius, oPen2 )
         oPrn:Line( nY + nRadius + 700, nX - nRadius, nY + nRadius + 700, nX - nRadius / 6, oPen2 )
         oPrn:Line( nY + nRadius + 700, nX + nRadius, nY + nRadius + 700, nX + nRadius / 6, oPen2 )

         oPrn:Say( nY + nRadius + 630, nX - nRadius, "<", oFont1 )
         oPrn:Say( nY + nRadius + 630, nX - 195, "200 mm", oFont1 )
         oPrn:Say( nY + nRadius + 630, nX + nRadius - 60, ">", oFont1 )

      ENDPAGE
   ENDPRINTER
   
   oPen1:End()
   oPen2:End()
   oFont1:End()

return nil


Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Circles - a geometric drawing example

Postby Antonio Linares » Fri Jan 04, 2019 10:19 am

More dimensions

circles.prg
Code: Select all  Expand view  RUN
#include "FiveWin.ch"

#define PI  3.14159265358979323846

function Main()

   local oPrn, oPen1, oPen2
   local nX := 2500, nY := 2000
   local nRadius := 1500, nRadius2 := 1300, nRadius3 := 700, nRadius4 := 315, nAngle
   local nAnglesToRadians := PI / 180
   local oFont1
   
   DEFINE PEN oPen1 WIDTH 15
   DEFINE PEN oPen2 WIDTH  7 STYLE 3

   PRINTER oPrn PREVIEW
   
      DEFINE FONT oFont1 NAME "Verdana" SIZE 0, -12 OF oPrn
   
      PAGE
         oPrn:Ellipse( nY - nRadius, nX - nRadius, nY + nRadius, nX + nRadius, oPen1 ) // External circle
         oPrn:Ellipse( nY - nRadius2, nX - nRadius2, nY + nRadius2, nX + nRadius2, oPen2 ) // Inner circle
         oPrn:Ellipse( nY - nRadius3, nX - nRadius3, nY + nRadius3, nX + nRadius3, oPen2 ) // Inner2 circle
         oPrn:Ellipse( nY - nRadius4, nX - nRadius4, nY + nRadius4, nX + nRadius4, oPen1 ) // Inner3 circle
         
         oPrn:Line( nY - 50, nX, nY + 50, nX, oPen2 )  // Vertical
         oPrn:Line( nY, nX - 50, nY, nX + 50, oPen2 )  // Horizontal
         oPrn:Line( nY, nX, nY, nX + nRadius, oPen2 )  // Right radio
         
         for nAngle = 0 to 360 step 30
            oPrn:Line( nY, nX, nY - nRadius * sin( nAngle * nAnglesToRadians ), nX + nRadius * cos( nAngle * nAnglesToRadians ), oPen2 )
         next
         
         for nAngle = 0 to 360 step 10
            if Mod( nAngle, 30 ) != 0
               oPrn:Ellipse( nY - nRadius2 * sin( nAngle * nAnglesToRadians ) - 40, nX + nRadius2 * cos( nAngle * nAnglesToRadians ) - 40,;
                             nY - nRadius2 * sin( nAngle * nAnglesToRadians ) + 40, nX + nRadius2 * cos( nAngle * nAnglesToRadians ) + 40, oPen1 )
            endif
         next

         for nAngle = 0 to 360 step 15
            if Mod( nAngle, 2 ) != 0
               oPrn:Ellipse( nY - nRadius3 * sin( nAngle * nAnglesToRadians ) - 40, nX + nRadius3 * cos( nAngle * nAnglesToRadians ) - 40,;
                             nY - nRadius3 * sin( nAngle * nAnglesToRadians ) + 40, nX + nRadius3 * cos( nAngle * nAnglesToRadians ) + 40, oPen1 )
            endif
         next
         
         oPrn:Line( nY, nX - nRadius, nY + nRadius + 800, nX - nRadius, oPen2 )
         oPrn:Line( nY, nX + nRadius, nY + nRadius + 800, nX + nRadius, oPen2 )
         oPrn:Line( nY + nRadius + 700, nX - nRadius, nY + nRadius + 700, nX - 250, oPen2 )
         oPrn:Line( nY + nRadius + 700, nX + nRadius, nY + nRadius + 700, nX + 250, oPen2 )

         oPrn:Say( nY + nRadius + 630, nX - nRadius, "<", oFont1 )
         oPrn:Say( nY + nRadius + 630, nX - 195, "200 mm", oFont1 )
         oPrn:Say( nY + nRadius + 630, nX + nRadius - 60, ">", oFont1 )

         oPrn:Line( nY, nX - nRadius2, nY + nRadius2 + 800, nX - nRadius2, oPen2 )
         oPrn:Line( nY, nX + nRadius2, nY + nRadius2 + 800, nX + nRadius2, oPen2 )
         oPrn:Line( nY + nRadius2 + 700, nX - nRadius2, nY + nRadius2 + 700, nX - 250, oPen2 )
         oPrn:Line( nY + nRadius2 + 700, nX + nRadius2, nY + nRadius2 + 700, nX + 250, oPen2 )

         oPrn:Say( nY + nRadius2 + 630, nX - nRadius2, "<", oFont1 )
         oPrn:Say( nY + nRadius2 + 630, nX - 195, "172 mm", oFont1 )
         oPrn:Say( nY + nRadius2 + 630, nX + nRadius2 - 60, ">", oFont1 )

         oPrn:Line( nY, nX - nRadius3, nY + nRadius3 + 1200, nX - nRadius3, oPen2 )
         oPrn:Line( nY, nX + nRadius3, nY + nRadius3 + 1200, nX + nRadius3, oPen2 )
         oPrn:Line( nY + nRadius3 + 1100, nX - nRadius3, nY + nRadius3 + 1100, nX - 250, oPen2 )
         oPrn:Line( nY + nRadius3 + 1100, nX + nRadius3, nY + nRadius3 + 1100, nX + 250, oPen2 )

         oPrn:Say( nY + nRadius3 + 1030, nX - nRadius3, "<", oFont1 )
         oPrn:Say( nY + nRadius3 + 1030, nX - 195, "120 mm", oFont1 )
         oPrn:Say( nY + nRadius3 + 1030, nX + nRadius3 - 60, ">", oFont1 )

      ENDPAGE
   ENDPRINTER
   
   oPen1:End()
   oPen2:End()
   oFont1:End()

return nil


Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Circles - a geometric drawing example

Postby Silvio.Falconi » Sat Jan 05, 2019 6:37 pm

I do not understood what you're creating but it's really nice!!!!
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: Circles - a geometric drawing example

Postby Antonio Linares » Sun Jan 06, 2019 10:17 am

circles.prg
Code: Select all  Expand view  RUN
#include "FiveWin.ch"

#define PI  3.14159265358979323846

function Main()

   local oPrn, oPen1, oPen2
   local nX := 2500, nY := 2000
   local nRadius := 1500, nRadius2 := 1300, nRadius3 := 700, nRadius4 := 315, nAngle
   local nAnglesToRadians := PI / 180
   local oFont1
   
   DEFINE PEN oPen1 WIDTH 15
   DEFINE PEN oPen2 WIDTH  7 STYLE 3

   PRINTER oPrn PREVIEW
   
      DEFINE FONT oFont1 NAME "Verdana" SIZE 0, -12 OF oPrn
   
      PAGE
         oPrn:Ellipse( nY - nRadius, nX - nRadius, nY + nRadius, nX + nRadius, oPen1 ) // External circle
         oPrn:Ellipse( nY - nRadius2, nX - nRadius2, nY + nRadius2, nX + nRadius2, oPen2 ) // Inner circle
         oPrn:Ellipse( nY - nRadius3, nX - nRadius3, nY + nRadius3, nX + nRadius3, oPen2 ) // Inner2 circle
         oPrn:Ellipse( nY - nRadius4, nX - nRadius4, nY + nRadius4, nX + nRadius4, oPen1 ) // Inner3 circle
         
         oPrn:Line( nY - 50, nX, nY + 50, nX, oPen2 )  // Vertical
         oPrn:Line( nY, nX - 50, nY, nX + 50, oPen2 )  // Horizontal
         oPrn:Line( nY, nX, nY, nX + nRadius, oPen2 )  // Right radio
         
         for nAngle = 0 to 360 step 30
            oPrn:Line( nY, nX, nY - nRadius * sin( nAngle * nAnglesToRadians ), nX + nRadius * cos( nAngle * nAnglesToRadians ), oPen2 )
         next
         
         for nAngle = 0 to 360 step 10
            if Mod( nAngle, 30 ) != 0
               oPrn:Ellipse( nY - nRadius2 * sin( nAngle * nAnglesToRadians ) - 40, nX + nRadius2 * cos( nAngle * nAnglesToRadians ) - 40,;
                             nY - nRadius2 * sin( nAngle * nAnglesToRadians ) + 40, nX + nRadius2 * cos( nAngle * nAnglesToRadians ) + 40, oPen1 )
            endif
         next

         for nAngle = 0 to 360 step 15
            if Mod( nAngle, 2 ) != 0
               oPrn:Ellipse( nY - nRadius3 * sin( nAngle * nAnglesToRadians ) - 40, nX + nRadius3 * cos( nAngle * nAnglesToRadians ) - 40,;
                             nY - nRadius3 * sin( nAngle * nAnglesToRadians ) + 40, nX + nRadius3 * cos( nAngle * nAnglesToRadians ) + 40, oPen1 )
            endif
         next
         
         oPrn:Line( nY, nX - nRadius, nY + nRadius + 1200, nX - nRadius, oPen2 )
         oPrn:Line( nY, nX + nRadius, nY + nRadius + 1200, nX + nRadius, oPen2 )
         oPrn:Line( nY + nRadius + 1100, nX - nRadius, nY + nRadius + 1100, nX - 250, oPen2 )
         oPrn:Line( nY + nRadius + 1100, nX + nRadius, nY + nRadius + 1100, nX + 250, oPen2 )

         oPrn:Say( nY + nRadius + 1040, nX - nRadius, "<", oFont1 )
         oPrn:Say( nY + nRadius + 1040, nX - 195, "200 mm", oFont1 )
         oPrn:Say( nY + nRadius + 1040, nX + nRadius - 60, ">", oFont1 )

         oPrn:Line( nY, nX - nRadius2, nY + nRadius2 + 1100, nX - nRadius2, oPen2 )
         oPrn:Line( nY, nX + nRadius2, nY + nRadius2 + 1100, nX + nRadius2, oPen2 )
         oPrn:Line( nY + nRadius2 + 1000, nX - nRadius2, nY + nRadius2 + 1000, nX - 250, oPen2 )
         oPrn:Line( nY + nRadius2 + 1000, nX + nRadius2, nY + nRadius2 + 1000, nX + 250, oPen2 )

         oPrn:Say( nY + nRadius2 + 930, nX - nRadius2, "<", oFont1 )
         oPrn:Say( nY + nRadius2 + 930, nX - 195, "172 mm", oFont1 )
         oPrn:Say( nY + nRadius2 + 930, nX + nRadius2 - 60, ">", oFont1 )

         oPrn:Line( nY, nX - nRadius3, nY + nRadius3 + 1400, nX - nRadius3, oPen2 )
         oPrn:Line( nY, nX + nRadius3, nY + nRadius3 + 1400, nX + nRadius3, oPen2 )
         oPrn:Line( nY + nRadius3 + 1300, nX - nRadius3, nY + nRadius3 + 1300, nX - 250, oPen2 )
         oPrn:Line( nY + nRadius3 + 1300, nX + nRadius3, nY + nRadius3 + 1300, nX + 250, oPen2 )

         oPrn:Say( nY + nRadius3 + 1230, nX - nRadius3, "<", oFont1 )
         oPrn:Say( nY + nRadius3 + 1230, nX - 195, "120 mm", oFont1 )
         oPrn:Say( nY + nRadius3 + 1230, nX + nRadius3 - 60, ">", oFont1 )
         
         oPrn:Line( nY, nX - nRadius4, nY + nRadius4 + 1500, nX - nRadius4, oPen2 )
         oPrn:Line( nY, nX + nRadius4, nY + nRadius4 + 1500, nX + nRadius4, oPen2 )
         oPrn:Line( nY + nRadius4 + 1400, nX - nRadius4, nY + nRadius4 + 1400, nX - 250, oPen2 )
         oPrn:Line( nY + nRadius4 + 1400, nX + nRadius4, nY + nRadius4 + 1400, nX + 250, oPen2 )

         oPrn:Say( nY + nRadius4 + 1330, nX - nRadius4, "<", oFont1 )
         oPrn:Say( nY + nRadius4 + 1330, nX - 175, "42 mm", oFont1 )
         oPrn:Say( nY + nRadius4 + 1330, nX + nRadius4 - 60, ">", oFont1 )          

      ENDPAGE
   ENDPRINTER
   
   oPen1:End()
   oPen2:End()
   oFont1:End()

return nil


Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Circles - a geometric drawing example

Postby Silvio.Falconi » Sun Jan 06, 2019 12:00 pm

I understand they are pulleys or wheels for your trial bike...:)
it would be nice to create a visual designer with a mouse to create geometric shapes
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: Circles - a geometric drawing example

Postby Antonio Linares » Thu Jan 10, 2019 10:08 am

circles.prg
Code: Select all  Expand view  RUN
#include "FiveWin.ch"

#define PI  3.14159265358979323846

function Main()

   local oPrn, oPen1, oPen2
   local nX := 2500, nY := 2000
   local nRadius := 1500, nRadius2 := 1300, nRadius3 := 600, nRadius4 := 315, nRadius5 := 430, nAngle
   local nAnglesToRadians := PI / 180
   local oFont1
   
   DEFINE PEN oPen1 WIDTH 15
   DEFINE PEN oPen2 WIDTH  7 STYLE 3

   PRINTER oPrn PREVIEW
   
      DEFINE FONT oFont1 NAME "Verdana" SIZE 0, -12 OF oPrn
   
      PAGE
         oPrn:Ellipse( nY - nRadius, nX - nRadius, nY + nRadius, nX + nRadius, oPen1 ) // External circle
         oPrn:Ellipse( nY - nRadius2, nX - nRadius2, nY + nRadius2, nX + nRadius2, oPen2 ) // Inner circle
         oPrn:Ellipse( nY - nRadius3, nX - nRadius3, nY + nRadius3, nX + nRadius3, oPen2 ) // Inner2 circle
         oPrn:Ellipse( nY - nRadius5, nX - nRadius5, nY + nRadius5, nX + nRadius5, oPen2 ) // Inner3 circle
         oPrn:Ellipse( nY - nRadius4, nX - nRadius4, nY + nRadius4, nX + nRadius4, oPen1 ) // Inner3 circle
         
         oPrn:Line( nY - 50, nX, nY + 50, nX, oPen2 )  // Vertical
         oPrn:Line( nY, nX - 50, nY, nX + 50, oPen2 )  // Horizontal
         oPrn:Line( nY, nX, nY, nX + nRadius, oPen2 )  // Right radio
         
         for nAngle = 0 to 360 step 30
            oPrn:Line( nY, nX, nY - nRadius * sin( nAngle * nAnglesToRadians ), nX + nRadius * cos( nAngle * nAnglesToRadians ), oPen2 )
         next
         
         for nAngle = 0 to 360 step 10
            if Mod( nAngle, 30 ) != 0
               oPrn:Ellipse( nY - nRadius2 * sin( nAngle * nAnglesToRadians ) - 50, nX + nRadius2 * cos( nAngle * nAnglesToRadians ) - 50,;
                             nY - nRadius2 * sin( nAngle * nAnglesToRadians ) + 50, nX + nRadius2 * cos( nAngle * nAnglesToRadians ) + 50, oPen1 )
            endif
         next

         for nAngle = 0 to 360 step 15
            if Mod( nAngle, 2 ) != 0
               oPrn:Ellipse( nY - nRadius3 * sin( nAngle * nAnglesToRadians ) - 50, nX + nRadius3 * cos( nAngle * nAnglesToRadians ) - 50,;
                             nY - nRadius3 * sin( nAngle * nAnglesToRadians ) + 50, nX + nRadius3 * cos( nAngle * nAnglesToRadians ) + 50, oPen1 )
            endif
         next

         for nAngle = 0 to 360 step 120
            oPrn:Ellipse( nY - ( nRadius3 - 170 ) * sin( nAngle * nAnglesToRadians ) - 50, nX + ( nRadius3 - 170 ) * cos( nAngle * nAnglesToRadians ) - 50,;
                          nY - ( nRadius3 - 170 ) * sin( nAngle * nAnglesToRadians ) + 50, nX + ( nRadius3 - 170 ) * cos( nAngle * nAnglesToRadians ) + 50, oPen1 )
         next

         oPrn:Line( nY, nX - nRadius4, nY + nRadius4 + 1500, nX - nRadius4, oPen2 )
         oPrn:Line( nY, nX + nRadius4, nY + nRadius4 + 1500, nX + nRadius4, oPen2 )
         oPrn:Line( nY + nRadius4 + 1400, nX - nRadius4, nY + nRadius4 + 1400, nX - 250, oPen2 )
         oPrn:Line( nY + nRadius4 + 1400, nX + nRadius4, nY + nRadius4 + 1400, nX + 250, oPen2 )

         oPrn:Say( nY + nRadius4 + 1330, nX - nRadius4, "<", oFont1 )
         oPrn:Say( nY + nRadius4 + 1330, nX - 220, "42,5 mm", oFont1 )
         oPrn:Say( nY + nRadius4 + 1330, nX + nRadius4 - 60, ">", oFont1 )

         oPrn:Line( nY, nX - nRadius5, nY + nRadius5 + 1650, nX - nRadius5, oPen2 )
         oPrn:Line( nY, nX + nRadius5, nY + nRadius5 + 1650, nX + nRadius5, oPen2 )
         oPrn:Line( nY + nRadius5 + 1550, nX - nRadius5, nY + nRadius5 + 1550, nX - 250, oPen2 )
         oPrn:Line( nY + nRadius5 + 1550, nX + nRadius5, nY + nRadius5 + 1550, nX + 250, oPen2 )

         oPrn:Say( nY + nRadius5 + 1480, nX - nRadius5, "<", oFont1 )
         oPrn:Say( nY + nRadius5 + 1480, nX - 190, "56 mm", oFont1 )
         oPrn:Say( nY + nRadius5 + 1480, nX + nRadius5 - 60, ">", oFont1 )

         oPrn:Line( nY, nX - nRadius3, nY + nRadius3 + 1700, nX - nRadius3, oPen2 )
         oPrn:Line( nY, nX + nRadius3, nY + nRadius3 + 1700, nX + nRadius3, oPen2 )
         oPrn:Line( nY + nRadius3 + 1600, nX - nRadius3, nY + nRadius3 + 1600, nX - 250, oPen2 )
         oPrn:Line( nY + nRadius3 + 1600, nX + nRadius3, nY + nRadius3 + 1600, nX + 250, oPen2 )

         oPrn:Say( nY + nRadius3 + 1530, nX - nRadius3, "<", oFont1 )
         oPrn:Say( nY + nRadius3 + 1530, nX - 190, "80 mm", oFont1 )
         oPrn:Say( nY + nRadius3 + 1530, nX + nRadius3 - 60, ">", oFont1 )

         oPrn:Line( nY, nX - nRadius2, nY + nRadius2 + 1200, nX - nRadius2, oPen2 )
         oPrn:Line( nY, nX + nRadius2, nY + nRadius2 + 1200, nX + nRadius2, oPen2 )
         oPrn:Line( nY + nRadius2 + 1100, nX - nRadius2, nY + nRadius2 + 1100, nX - 250, oPen2 )
         oPrn:Line( nY + nRadius2 + 1100, nX + nRadius2, nY + nRadius2 + 1100, nX + 250, oPen2 )

         oPrn:Say( nY + nRadius2 + 1030, nX - nRadius2, "<", oFont1 )
         oPrn:Say( nY + nRadius2 + 1030, nX - 195, "172 mm", oFont1 )
         oPrn:Say( nY + nRadius2 + 1030, nX + nRadius2 - 60, ">", oFont1 )

         oPrn:Line( nY, nX - nRadius, nY + nRadius + 1200, nX - nRadius, oPen2 )
         oPrn:Line( nY, nX + nRadius, nY + nRadius + 1200, nX + nRadius, oPen2 )
         oPrn:Line( nY + nRadius + 1100, nX - nRadius, nY + nRadius + 1100, nX - 250, oPen2 )
         oPrn:Line( nY + nRadius + 1100, nX + nRadius, nY + nRadius + 1100, nX + 250, oPen2 )

         oPrn:Say( nY + nRadius + 1040, nX - nRadius, "<", oFont1 )
         oPrn:Say( nY + nRadius + 1040, nX - 195, "200 mm", oFont1 )
         oPrn:Say( nY + nRadius + 1040, nX + nRadius - 60, ">", oFont1 )
         
         oPrn:Say( nY + nRadius + 1300, nX - nRadius, "Todos los orificios miden 8,5 mm diámetro", oFont1 )
         oPrn:Say( nY + nRadius + 1500, nX - nRadius, "A excepción del orificio central que mide 42,5 mm diámetro", oFont1 )
         oPrn:Say( nY + nRadius + 1900, nX - nRadius, "(c) FiveTech Software S.L., 2019", oFont1 )

      ENDPAGE
   ENDPRINTER
   
   oPen1:End()
   oPen2:End()
   oFont1:End()

return nil


Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Circles - a geometric drawing example

Postby Silvio.Falconi » Tue Jan 15, 2019 7:34 am

Image



then.. what'is this ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: Circles - a geometric drawing example

Postby Antonio Linares » Tue Jan 15, 2019 10:23 am

It is the plan for an electric engine :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Circles - a geometric drawing example

Postby Marcelo Via Giglio » Mon Jan 28, 2019 6:33 pm

Hi,

many years ago ( 10 or more ) paco Garcia build a program to draw with FW, I created the exe and made some improve

https://app.box.com/s/4x1438b5q0btxaz8cnvoa7uxlfc1ba54

the exe file link

https://app.box.com/s/6lq2lxu3p5lse9bp50put2lxjjesoq1o

I need to reorganize the code and then I will share it, please I need time for this, please be patients (specially Silvio)

Regards

Marcelo Vía
Marcelo Via Giglio
 
Posts: 1065
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: Circles - a geometric drawing example

Postby Silvio.Falconi » Tue Jan 29, 2019 7:46 am

MArcello I allready have paint sources...no need it
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: Circles - a geometric drawing example

Postby Antonio Linares » Wed Jan 30, 2019 6:04 pm

Marcelo,

Many thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 39 guests