From 7e75215f266e0b1ff2a7a33fe392d6b6042e355a Mon Sep 17 00:00:00 2001 From: Jorge Cruz Date: Thu, 18 Feb 2021 16:51:38 -0600 Subject: [PATCH 01/10] Actualizacion --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index a1e2a39..023e50a 100644 --- a/index.html +++ b/index.html @@ -45,14 +45,14 @@
- Featured + Canvas de vizualizaion
Special title treatment
-

With supporting text below as a natural lead-in to additional content.

+

Está es el área de dibujo dosponible.

From 33b71cf283c95f3ad9ebe897c75d588d62f3a72e Mon Sep 17 00:00:00 2001 From: Jorge Cruz Perez <68938473+jorrgeCruz@users.noreply.github.com> Date: Sat, 27 Mar 2021 16:23:09 -0600 Subject: [PATCH 02/10] Update issue templates --- .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From 5d50b55e9d1d71babf144c06899fd2b4ef8de2a6 Mon Sep 17 00:00:00 2001 From: Jorge Cruz Perez <68938473+jorrgeCruz@users.noreply.github.com> Date: Sat, 27 Mar 2021 16:31:59 -0600 Subject: [PATCH 03/10] Update issue templates --- .github/ISSUE_TEMPLATE/custom.md | 10 ++++++++++ .github/ISSUE_TEMPLATE/feature-request-template.md | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/custom.md create mode 100644 .github/ISSUE_TEMPLATE/feature-request-template.md diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md new file mode 100644 index 0000000..48d5f81 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/custom.md @@ -0,0 +1,10 @@ +--- +name: Custom issue template +about: Describe this issue template's purpose here. +title: '' +labels: '' +assignees: '' + +--- + + diff --git a/.github/ISSUE_TEMPLATE/feature-request-template.md b/.github/ISSUE_TEMPLATE/feature-request-template.md new file mode 100644 index 0000000..f048c96 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request-template.md @@ -0,0 +1,10 @@ +--- +name: Feature request template +about: Plantilla guia para la elaboración de features en este proyecto. +title: '' +labels: Feature request +assignees: '' + +--- + +## Nombre de la funcion / modulo From 9042241d58a3ac247167bf79824d154c70327e6f Mon Sep 17 00:00:00 2001 From: Jorge Cruz Perez <68938473+jorrgeCruz@users.noreply.github.com> Date: Sat, 27 Mar 2021 16:36:15 -0600 Subject: [PATCH 04/10] Update issue templates --- .github/ISSUE_TEMPLATE/custom.md | 10 ---------- .../feature-request-template.md | 9 ++++++++- .github/ISSUE_TEMPLATE/feature_request.md | 20 ------------------- 3 files changed, 8 insertions(+), 31 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/custom.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md deleted file mode 100644 index 48d5f81..0000000 --- a/.github/ISSUE_TEMPLATE/custom.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: Custom issue template -about: Describe this issue template's purpose here. -title: '' -labels: '' -assignees: '' - ---- - - diff --git a/.github/ISSUE_TEMPLATE/feature-request-template.md b/.github/ISSUE_TEMPLATE/feature-request-template.md index f048c96..494bf05 100644 --- a/.github/ISSUE_TEMPLATE/feature-request-template.md +++ b/.github/ISSUE_TEMPLATE/feature-request-template.md @@ -7,4 +7,11 @@ assignees: '' --- -## Nombre de la funcion / modulo +## Nombre de la función / modulo +Nombre a asignar a la función/ modulo a implementar + +## Ruta de la función / modulo +Ruta desde el menu de la aplicación para llamar a la función o forma en la que se ejecutara esta función/modulo + +## Material de apoyo +Código de apoyo, material de soporte o enlaces a la documentación sugerida. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index bbcbbe7..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. From f8d76c59395379e040fe038fe04334c1431f8539 Mon Sep 17 00:00:00 2001 From: Jorge Cruz Date: Mon, 5 Apr 2021 15:11:49 -0500 Subject: [PATCH 05/10] Ejercicio 1,2 --- dist/src/canvasLocal.js | 72 +++++++++++++++++++++++++++++++++++++-- index.html | 2 +- src/canvasLocal.ts | 75 ++++++++++++++++++++++++++++++++++++++--- src/index.js | 15 --------- 4 files changed, 141 insertions(+), 23 deletions(-) delete mode 100644 src/index.js diff --git a/dist/src/canvasLocal.js b/dist/src/canvasLocal.js index 385826d..07d106e 100644 --- a/dist/src/canvasLocal.js +++ b/dist/src/canvasLocal.js @@ -11,9 +11,75 @@ export class CanvasLocal { } iX(x) { return Math.round(this.centerX + x / this.pixelSize); } iY(y) { return Math.round(this.centerY - y / this.pixelSize); } - paint() { - this.graphics.arc(this.iX(0), this.iY(0), Math.abs(this.iX(4) - this.iX(0)), 0, 2 * Math.PI, false); + drawLine(x1, y1, x2, y2) { + this.graphics.beginPath(); + this.graphics.moveTo(x1, y1); + this.graphics.lineTo(x2, y2); + this.graphics.closePath(); this.graphics.stroke(); - this.graphics.fillText("Lienzo listo desde ts", this.iX(2), this.iY(3.7)); + } + paint() { + //this.graphics.arc(this.iX(0), this.iY(0), Math.abs(this.iX(4)-this.iX(0)), 0,2*Math.PI, false); + //this.graphics.stroke(); + //this.graphics.fillText("Lienzo listo desde ts", this.iX(2), this.iY(3.7)); + //debugger; + //this.drawLine(320, 40, 480, 400); + //this.drawLine(320, 40, 140, 400); + //this.drawLine(140, 400, 480, 400); + let lado = 100; + let side = 0.95 * lado; + let sideHalf = 0.5 * side; + let xCenter = 320; + let yCenter = 240; + let h = sideHalf * Math.sqrt(3); + let xA, yA, xB, yB, xC, yC, xA1, yA1, xB1, yB1, xC1, yC1, p, q; + q = 0.05; + p = 1 - q; + /*xA = xCenter - sideHalf; + yA = yCenter - 0.5 * h; + xB = xCenter + sideHalf; + yB = yA; + xC = xCenter; + yC = yCenter + 0.5 * h; */ + for (let m = 0; m < 4; m++) { + for (let n = 0; n < 4; n++) { + xA = 100 + n * lado - sideHalf; + yA = 100 + m * lado - 0.5 * h; + xB = 100 + n * lado + sideHalf; + yB = yA; + xC = 100 + n * lado; + yC = 100 + m * lado + 0.5 * h; + for (let i = 0; i < 20; i++) { + this.drawLine(xA, yA, xB, yB); + this.drawLine(xB, yB, xC, yC); + this.drawLine(xC, yC, xA, yA); + xA1 = p * xA + q * xB; + yA1 = p * yA + q * yB; + xB1 = p * xB + q * xC; + yB1 = p * yB + q * yC; + xC1 = p * xC + q * xA; + yC1 = p * yC + q * yA; + xA = xA1; + xB = xB1; + xC = xC1; + yA = yA1; + yB = yB1; + yC = yC1; + } + } + } + /* for (let i = 0; i < 50; i++){ + this.drawLine(xA, yA, xB, yB); + this.drawLine(xB, yB, xC, yC); + this.drawLine(xC, yC, xA, yA); + xA1 = p * xA + q * xB; + yA1 = p * yA + q * yB; + xB1 = p * xB + q * xC; + yB1 = p * yB + q * yC; + xC1 = p * xC + q * xA; + yC1 = p * yC + q * yA; + xA = xA1; xB = xB1; xC = xC1; + yA = yA1; yB = yB1; yC = yC1; + } */ } } diff --git a/index.html b/index.html index 023e50a..c5fff25 100644 --- a/index.html +++ b/index.html @@ -48,7 +48,7 @@ Canvas de vizualizaion
- +
Special title treatment
diff --git a/src/canvasLocal.ts b/src/canvasLocal.ts index f6573f3..be36ce5 100644 --- a/src/canvasLocal.ts +++ b/src/canvasLocal.ts @@ -23,12 +23,79 @@ export class CanvasLocal { } iX( x: number):number{return Math.round(this.centerX + x/this.pixelSize);} - iY( y: number):number{return Math.round(this.centerY - y/this.pixelSize);} + iY(y: number): number{ return Math.round(this.centerY - y / this.pixelSize); } + drawLine(x1: number, y1: number, x2: number, y2:number) { + this.graphics.beginPath(); + this.graphics.moveTo(x1, y1); + this.graphics.lineTo(x2, y2); + this.graphics.closePath(); + this.graphics.stroke(); + } paint() { - this.graphics.arc(this.iX(0), this.iY(0), Math.abs(this.iX(4)-this.iX(0)), 0,2*Math.PI, false); - this.graphics.stroke(); - this.graphics.fillText("Lienzo listo desde ts", this.iX(2), this.iY(3.7)); + //this.graphics.arc(this.iX(0), this.iY(0), Math.abs(this.iX(4)-this.iX(0)), 0,2*Math.PI, false); + //this.graphics.stroke(); + //this.graphics.fillText("Lienzo listo desde ts", this.iX(2), this.iY(3.7)); + //debugger; + //this.drawLine(320, 40, 480, 400); + //this.drawLine(320, 40, 140, 400); + //this.drawLine(140, 400, 480, 400); + let lado = 100; + let side = 0.95 * lado; + let sideHalf = 0.5 * side; + let xCenter = 320; + let yCenter = 240; + + let h = sideHalf * Math.sqrt(3); + let xA, yA, xB, yB, xC, yC, + xA1, yA1, xB1, yB1, xC1, yC1, p, q; + q = 0.05; + p = 1 - q; + /*xA = xCenter - sideHalf; + yA = yCenter - 0.5 * h; + xB = xCenter + sideHalf; + yB = yA; + xC = xCenter; + yC = yCenter + 0.5 * h; */ + + for (let m = 0; m < 4; m++){ + for (let n = 0; n < 4; n++){ + xA = 100+n*lado - sideHalf; + yA = 100+m*lado - 0.5 * h; + xB = 100+n*lado+ sideHalf; + yB = yA; + xC = 100+n*lado; + yC = 100+m*lado + 0.5 * h; + for (let i = 0; i < 20; i++){ + this.drawLine(xA, yA, xB, yB); + this.drawLine(xB, yB, xC, yC); + this.drawLine(xC, yC, xA, yA); + xA1 = p * xA + q * xB; + yA1 = p * yA + q * yB; + xB1 = p * xB + q * xC; + yB1 = p * yB + q * yC; + xC1 = p * xC + q * xA; + yC1 = p * yC + q * yA; + xA = xA1; xB = xB1; xC = xC1; + yA = yA1; yB = yB1; yC = yC1; + } + } + } + + /* for (let i = 0; i < 50; i++){ + this.drawLine(xA, yA, xB, yB); + this.drawLine(xB, yB, xC, yC); + this.drawLine(xC, yC, xA, yA); + xA1 = p * xA + q * xB; + yA1 = p * yA + q * yB; + xB1 = p * xB + q * xC; + yB1 = p * yB + q * yC; + xC1 = p * xC + q * xA; + yC1 = p * yC + q * yA; + xA = xA1; xB = xB1; xC = xC1; + yA = yA1; yB = yB1; yC = yC1; + } */ + } } \ No newline at end of file diff --git a/src/index.js b/src/index.js deleted file mode 100644 index 0b459d6..0000000 --- a/src/index.js +++ /dev/null @@ -1,15 +0,0 @@ -const canvas = document.getElementById("circlechart"); -const graphics = canvas.getContext("2d"); - -const rWidth= 10, rHeight=10; -var maxX = canvas.width - 1, maxY = canvas.height - 1, - pixelSize = Math.max(rWidth/maxX, rHeight/maxY), - centerX = maxX/2, centerY = maxY/2; - -function iX( x){return Math.round(centerX + x/pixelSize);} -function iY( y){return Math.round(centerY - y/pixelSize);} - -graphics.arc(iX(0), iY(0), Math.abs(iX(4)-iX(0)), 0,2*Math.PI, false); -graphics.stroke(); - -graphics.fillText("Lienzo listo", iX(2), iY(3.7)); \ No newline at end of file From 7725dbc70a190b5aa5d74e43073ef1fc100dd858 Mon Sep 17 00:00:00 2001 From: RafaelLopez Date: Tue, 6 Jul 2021 16:15:12 -0500 Subject: [PATCH 06/10] Mi repositorio de un fork --- style/proyecto.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 style/proyecto.txt diff --git a/style/proyecto.txt b/style/proyecto.txt new file mode 100644 index 0000000..e69de29 From 377e9714258c2b949ee747a3e80759c4532657eb Mon Sep 17 00:00:00 2001 From: RafaelLopez Date: Thu, 8 Jul 2021 13:25:26 -0500 Subject: [PATCH 07/10] Agregue proyecto CASA Prueba 1 --- PROYECTO.txt | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 PROYECTO.txt diff --git a/PROYECTO.txt b/PROYECTO.txt new file mode 100644 index 0000000..41e2c65 --- /dev/null +++ b/PROYECTO.txt @@ -0,0 +1,45 @@ +1 0 -30 0 +2 0 -10 0 +3 0 -10 20 +4 0 0 20 +5 0 0 0 +6 0 3O 0 +7 0 30 15 +8 0 15 15 +9 0 15 25 +10 0 30 25 +11 0 30 25 +12 0 40 35 +13 0 30 45 +14 0 -30 45 +15 0 -40 35 +16 0 -30 35 +17 -30 -30 0 +18 -30 -10 0 +19 -30 -10 20 +20 -30 0 20 +21 -30 0 0 +22 -30 30 0 +23 -30 30 15 +24 -30 15 15 +25 -30 15 25 +26 -30 30 25 +27 -30 30 35 +28 -30 40 35 +29 -30 30 45 +30 -30 -30 45 +31 -30 -40 35 +32 -30 -30 35 +Faces: +1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16. +17 18 19 20 21 22 23 24 25 26 27 28 29 30 21 32. +1 2 5 6 22 17. +13 14 30 29. +12 13 29 28. +15 14 30 31. +29 30 31 32 27 28. +13 14 15 16 11 12. +1 16 32 17. +15 16 32 31. +11 12 28 27. +6 7 10 11 27 22. \ No newline at end of file From bb91b01353b0f4186d49f998262d5743778e9ddb Mon Sep 17 00:00:00 2001 From: RafaelLopez Date: Thu, 8 Jul 2021 13:38:39 -0500 Subject: [PATCH 08/10] Agregue proyecto CASA --- proyectoCASA.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 proyectoCASA.txt diff --git a/proyectoCASA.txt b/proyectoCASA.txt new file mode 100644 index 0000000..e69de29 From 44aca64ffb4a70025acae7ab75c043c75dad6353 Mon Sep 17 00:00:00 2001 From: RafaelLopez Date: Thu, 5 Aug 2021 11:20:14 -0500 Subject: [PATCH 09/10] actualproyecto --- proyectoCASA.txt | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/proyectoCASA.txt b/proyectoCASA.txt index e69de29..41e2c65 100644 --- a/proyectoCASA.txt +++ b/proyectoCASA.txt @@ -0,0 +1,45 @@ +1 0 -30 0 +2 0 -10 0 +3 0 -10 20 +4 0 0 20 +5 0 0 0 +6 0 3O 0 +7 0 30 15 +8 0 15 15 +9 0 15 25 +10 0 30 25 +11 0 30 25 +12 0 40 35 +13 0 30 45 +14 0 -30 45 +15 0 -40 35 +16 0 -30 35 +17 -30 -30 0 +18 -30 -10 0 +19 -30 -10 20 +20 -30 0 20 +21 -30 0 0 +22 -30 30 0 +23 -30 30 15 +24 -30 15 15 +25 -30 15 25 +26 -30 30 25 +27 -30 30 35 +28 -30 40 35 +29 -30 30 45 +30 -30 -30 45 +31 -30 -40 35 +32 -30 -30 35 +Faces: +1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16. +17 18 19 20 21 22 23 24 25 26 27 28 29 30 21 32. +1 2 5 6 22 17. +13 14 30 29. +12 13 29 28. +15 14 30 31. +29 30 31 32 27 28. +13 14 15 16 11 12. +1 16 32 17. +15 16 32 31. +11 12 28 27. +6 7 10 11 27 22. \ No newline at end of file From d397d89b105af1726e7110cd7ddce7dec8a9ca14 Mon Sep 17 00:00:00 2001 From: RafaelLopez Date: Thu, 5 Aug 2021 11:32:33 -0500 Subject: [PATCH 10/10] actualproyecto --- index.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 7c99ed6..5c64071 100644 --- a/index.html +++ b/index.html @@ -11,14 +11,22 @@ + + + +