- ji.podhead.com (under construction)
- in/leonardo-j-09b358275
- https://medium.com/@ji-podhead
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
| import * as THREE from 'three'; | |
| import { MeshSurfaceSampler } from 'three/examples/jsm/math/MeshSurfaceSampler.js'; | |
| /** | |
| * Extrahiert Textureddaten in ein format, das einfach zu sampeln ist. | |
| * @param {THREE.Texture} texture - Die zu verarbeitende Texture. | |
| * @returns {ImageData} Die Bilddaten der Texture. | |
| */ | |
| function getTextureImageData(texture) { | |
| const image = texture.image; |
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
| import bpy | |
| import bmesh | |
| import numpy as np | |
| import json | |
| from mathutils import Vector | |
| from collections import defaultdict | |
| def texture_surface_voxelizer(obj, particle_count, output_filepath="voxel_data.json"): | |
| """ | |
| Voxelizes the surface of a Blender object, extracts texture colors, |
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
| version: "3.9" | |
| services: | |
| gmail: | |
| image: python:3.11 | |
| ports: | |
| - "8000:3000" | |
| command: bash -c "apt-get update && apt install --assume-yes npm && npm i -g npx && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash && \. $HOME/.nvm/nvm.sh && nvm install 24" | |
| privileged: true | |
| # restart: always | |
| tty: true |
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
| #!/bin/sh | |
| # create ovs bridge named bridge0 | |
| nmcli conn add type ovs-bridge conn.interface bridge0 autoconnect yes | |
| # add add a port to the bridge for the internal ovs interface (iface0) | |
| nmcli conn add type ovs-port conn.interface port0 master bridge0 autoconnect yes | |
| # add internal ovs interface to the create port0 | |
| nmcli conn add type ovs-interface conn.interface iface0 master port0 autoconnect yes ipv4.method auto |