#lang scheme/gui

;;LA VENTANA Y EL LIENZO
(define ventana
  (make-object frame% 
    "3 D" 
    #f 
    500 500;ANCHO ALTO
    1400 0;UBICACIÓN
    ))

(define lienzo
  (instantiate canvas% 
    (ventana) 
    (style '(border)) ))
  
(define dc (send lienzo get-dc))

(send ventana show #t)
(sleep/yield 1)

;;profundidad
(define casa
  (lambda (dc)
    (send dc set-pen (make-object pen% "black" 2 'solid))
    (send dc set-brush (make-object brush% "navajowhite" 'solid))
    (send dc draw-rectangle 100 200 300 200)
    (send dc draw-rectangle 220 300 50 100)
    (send dc draw-rectangle 120 220 50 50)
    (send dc draw-rectangle 320 220 50 50)
    (send dc draw-polygon
          (list
           (make-object point% 100 200)
           (make-object point% 250 150)
           (make-object point% 400 200)) 0 0) ))
;(casa dc)
(define sol
  (lambda (dc)
    (send dc set-pen (make-object pen% "gold" 20 'solid))
    (send dc set-brush (make-object brush% "gold" 'solid))
    (send dc draw-ellipse 150 130 200 200)
    (send dc draw-line 250 50 250 410)
    (send dc draw-line 50 230 440 230) ))
;(sol dc)

(define banco
  (lambda (dc)
    (send dc set-brush (make-object brush% "darkgray" 'solid))
    (send dc draw-rectangle 150 200 200 30)
    (send dc draw-rectangle 150 230 30 50)
    (send dc draw-rectangle 320 230 30 50) ))
;(banco dc)
;;Casa
(define casa1
  (lambda (dc)
    (send dc set-pen (make-object pen% "black" 2 'solid))
    (send dc set-brush (make-object brush% "navajowhite" 'solid))
    (send dc draw-rectangle 100 200 300 200)
    (send dc draw-rectangle 220 300 50 100)
    (send dc draw-rectangle 120 220 50 50)
    (send dc draw-rectangle 320 220 50 50)
    (send dc draw-polygon
          (list
           (make-object point% 100 200)
           (make-object point% 250 150)
           (make-object point% 400 200)) 0 0) ))
(define sol1
  (lambda (dc)
    (send dc set-pen (make-object pen% "gold" 5 'solid))
    (send dc set-brush (make-object brush% "gold" 'solid))
    (send dc draw-ellipse 260 130 20 20)
    (send dc draw-line 240 140 300 140)
    (send dc draw-line 270 110 270 180) ))

(define banco1
  (lambda (dc)
    (send dc set-brush (make-object brush% "darkgray" 'solid))
    (send dc draw-rectangle 60 360 200 30)
    (send dc draw-rectangle 60 390 30 50)
    (send dc draw-rectangle 230 390 30 50) ))
(sol1 dc)
(casa1 dc)
(banco1 dc)