{"id":827,"date":"2012-04-27T21:57:56","date_gmt":"2012-04-27T21:57:56","guid":{"rendered":"http:\/\/www.pycheung.com\/weblog\/?p=827"},"modified":"2012-12-12T00:35:02","modified_gmt":"2012-12-12T00:35:02","slug":"curve-class-module-attempt-1","status":"publish","type":"post","link":"https:\/\/www.pycheung.com\/weblog\/post\/827","title":{"rendered":"curve class module for script sequencer on Sketchup: attempt 1"},"content":{"rendered":"<p>[1] <a href=\"http:\/\/www.pycheung.com\/weblog\/wp-content\/uploads\/srf_interpolate1.jpg\" title=\"srf_interpolate1.jpg\">            <img loading=\"lazy\" src=\"http:\/\/www.pycheung.com\/weblog\/wp-content\/uploads\/zrtn_002n4da6c148_tn.jpg\" style=\"BORDER-BOTTOM: #000000 1px; BORDER-LEFT: #000000 1px; BORDER-TOP: #000000 1px; BORDER-RIGHT: #000000 1px\" height=\"190\" width=\"250\" alt=\"srf_interpolate1.jpg\" border=\"0\"\/>          <\/a> [2] <a href=\"http:\/\/www.pycheung.com\/weblog\/wp-content\/uploads\/srf_interpolate2.jpg\" title=\"srf_interpolate2.jpg\">            <img loading=\"lazy\" src=\"http:\/\/www.pycheung.com\/weblog\/wp-content\/uploads\/zrtn_003p414bb8cd_tn.jpg\" style=\"BORDER-BOTTOM: #000000 1px; BORDER-LEFT: #000000 1px; BORDER-TOP: #000000 1px; BORDER-RIGHT: #000000 1px\" height=\"190\" width=\"250\" alt=\"srf_interpolate2.jpg\" border=\"0\"\/>          <\/a> <a href=\"http:\/\/www.pycheung.com\/weblog\/wp-content\/uploads\/srf_interpolate3.jpg\" title=\"srf_interpolate3.jpg\">            <img loading=\"lazy\" src=\"http:\/\/www.pycheung.com\/weblog\/wp-content\/uploads\/zrtn_004n14faa0cf_tn.jpg\" style=\"BORDER-BOTTOM: #000000 1px; BORDER-LEFT: #000000 1px; BORDER-TOP: #000000 1px; BORDER-RIGHT: #000000 1px\" height=\"190\" width=\"250\" alt=\"srf_interpolate3.jpg\" border=\"0\"\/>          <\/a>         <\/p>\n<p>[1] <a href=\"http:\/\/www.pycheung.com\/weblog\/wp-content\/uploads\/srf_interpolate1.jpg\" title=\"srf_interpolate1.jpg\">            <img loading=\"lazy\" src=\"http:\/\/www.pycheung.com\/weblog\/wp-content\/uploads\/zrtn_002n4da6c148_tn.jpg\" style=\"BORDER-BOTTOM: #000000 1px; BORDER-LEFT: #000000 1px; BORDER-TOP: #000000 1px; BORDER-RIGHT: #000000 1px\" height=\"190\" width=\"250\" alt=\"srf_interpolate1.jpg\" border=\"0\"\/>          <\/a> [3] <a href=\"http:\/\/www.pycheung.com\/weblog\/wp-content\/uploads\/srf_interpolate2cm_0001.jpg\" title=\"srf_interpolate2cm.jpg\">            <img loading=\"lazy\" src=\"http:\/\/www.pycheung.com\/weblog\/wp-content\/uploads\/zrtn_007p54d46b51_tn.jpg\" style=\"BORDER-BOTTOM: #000000 1px; BORDER-LEFT: #000000 1px; BORDER-TOP: #000000 1px; BORDER-RIGHT: #000000 1px\" height=\"190\" width=\"250\" alt=\"srf_interpolate2cm.jpg\" border=\"0\"\/>          <\/a> <a href=\"http:\/\/www.pycheung.com\/weblog\/wp-content\/uploads\/srf_interpolate3cm.jpg\" title=\"srf_interpolate3cm.jpg\">            <img loading=\"lazy\" src=\"http:\/\/www.pycheung.com\/weblog\/wp-content\/uploads\/zrtn_006n2bb62f28_tn.jpg\" style=\"BORDER-BOTTOM: #000000 1px; BORDER-LEFT: #000000 1px; BORDER-TOP: #000000 1px; BORDER-RIGHT: #000000 1px\" height=\"190\" width=\"250\" alt=\"srf_interpolate3cm.jpg\" border=\"0\"\/>          <\/a> <\/p>\n<p>nurb\/spline curves and surfaces are usually drawn in opengl or flash 3d engine as polyline by interpolating control points. This is nothing new to sketchup since this has already been implemented in some great ruby scripts by others i.e. beizerspline, curviloft, simple loft. so I am just going to implement a few for the graphical sequencer. <\/p>\n<p>images above shows some standard sketchup ArcCurves [1], ordered using the line in the middle (a lot of work is required here to isolate,group and sort things from sketchup, I will have to sort this out or at least find a better solution before releasing), each divided into an equal number of points, the points are then paired by its index (flipmatrix in gh), each of these array is used to create a degree 3 nurbs[2] or catmull spline[3] as polyline, points are then connected to form a standard sketchup polygonmesh<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[1] [2] [1] [3] nurb\/spline curves and surfaces are usually drawn in opengl or flash 3d engine as polyline by interpolating control points. This is nothing new to sketchup since&#8230;<\/p>\n<div class=\"royalwp-readmore-wrap\"><a href=\"https:\/\/www.pycheung.com\/weblog\/post\/827\" class=\"royalwp-readmore\">Explore more <i class=\"far fa-hand-point-right\"><\/i><\/a><\/div>\n","protected":false},"author":2,"featured_media":1167,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[153],"tags":[162,163,72,96,103,164],"_links":{"self":[{"href":"https:\/\/www.pycheung.com\/weblog\/wp-json\/wp\/v2\/posts\/827"}],"collection":[{"href":"https:\/\/www.pycheung.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pycheung.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pycheung.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pycheung.com\/weblog\/wp-json\/wp\/v2\/comments?post=827"}],"version-history":[{"count":10,"href":"https:\/\/www.pycheung.com\/weblog\/wp-json\/wp\/v2\/posts\/827\/revisions"}],"predecessor-version":[{"id":1196,"href":"https:\/\/www.pycheung.com\/weblog\/wp-json\/wp\/v2\/posts\/827\/revisions\/1196"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pycheung.com\/weblog\/wp-json\/wp\/v2\/media\/1167"}],"wp:attachment":[{"href":"https:\/\/www.pycheung.com\/weblog\/wp-json\/wp\/v2\/media?parent=827"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pycheung.com\/weblog\/wp-json\/wp\/v2\/categories?post=827"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pycheung.com\/weblog\/wp-json\/wp\/v2\/tags?post=827"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}