This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public ConwayPoly Subdivide(float offset) | |
| { | |
| var faceIndices = new List<int[]>(); | |
| var vertexPoints = new List<Vector3>(); | |
| // Add existing vertices | |
| for (int vertexIndex = 0; vertexIndex < Vertices.Count; vertexIndex++) | |
| { | |
| var x = Vertices[vertexIndex]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Moebius transformations in 3d, by reverse stereographic projection to the 3-sphere, | |
| //rotation in 4d space, and projection back. | |
| //by Daniel Piker 09/08/20 | |
| //Feel free to use, adapt and reshare. I'd appreciate a mention if you post something using this. | |
| //You can also now find this transformation as a component in Grasshopper/Rhino | |
| //I first wrote about these transformations here: | |
| //https://spacesymmetrystructure.wordpress.com/2008/12/11/4-dimensional-rotations/ | |
| Shader "Custom/Moebius" | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (c) 2013 Calvin Rien | |
| * | |
| * Based on the JSON parser by Patrick van Bergen | |
| * http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
| * | |
| * Simplified it so that it doesn't throw exceptions | |
| * and can be used in Unity iPhone with maximum code stripping. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.Generic; | |
| using ProceduralToolkit; | |
| using ProceduralToolkit.Samples.Primitives; | |
| using UnityEngine; | |
| using XNode; | |
| public enum PrimitiveType | |
| { | |
| Dodecahedron, | |
| Octahedron |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def gltf(request, lat, lng, distance): | |
| scale = 100000 | |
| pnt = GEOSGeometry(f'POINT({lng} {lat})', srid=4326) | |
| buildings = Building.objects.filter(outline__distance_lte=(pnt, D(km=distance))) | |
| scene = Scene() | |
| centroid_total = (0,0) | |
| count = 0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Name": "Snapping", | |
| "ShapeType": "Johnson", | |
| "PolyTypeCategory": "All", | |
| "PolyType": "Small_Cubicuboctahedron", | |
| "JohnsonPolyType": "Cupola", | |
| "OtherPolyType": "L1", | |
| "GridType": "Square", | |
| "GridShape": "Cube", | |
| "BypassOps": false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine.Rendering; | |
| using UnityEngine.Rendering.Universal; | |
| public class DepthNormalsFeature : ScriptableRendererFeature | |
| { | |
| private DepthNormalsPass depthNormalsPass; | |
| RenderTargetHandle m_DepthNormalsTexture; | |
| public override void Create() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| public ChangeStuff() | |
| { | |
| gameobject.GetComponent<MeshRenderer>().material.color = Color.red; | |
| transform.localScale = new Vector3(5,5,5); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Name": "Brazier", | |
| "ShapeType": "Uniform", | |
| "PolyType": 39, | |
| "JohnsonPolyType": 4, | |
| "BypassOps": false, | |
| "TwoSided": true, | |
| "GridType": "Hex", | |
| "PrismP": 5, | |
| "PrismQ": 2, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Name": "Vicious", | |
| "ShapeType": "Uniform", | |
| "PolyType": 29, | |
| "JohnsonPolyType": 4, | |
| "BypassOps": false, | |
| "TwoSided": true, | |
| "GridType": "Hex", | |
| "PrismP": 5, | |
| "PrismQ": 2, |