This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# --------------------------LIBRERIAS-------------------------- # | |
# ------------------------------------------------------------- # | |
import numpy as np | |
# ------------------------------------------------------------- # | |
# -------------------------FUNCIONES--------------------------- # | |
def generate_random_points_2D(num_puntos, media, mat_cov): | |
aux_arr = [] | |
for i in range(num_puntos): |
This file contains 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
# NOTE: changing texture dimensions shouldn't affect vector scope/histogram much | |
V3D_IMAGE_WIDTH = 512 # region.width | |
V3D_IMAGE_HEIGHT = 512 # region.height | |
offscreen = gpu.types.GPUOffScreen(V3D_IMAGE_WIDTH, V3D_IMAGE_HEIGHT) | |
# TODO: apply srgb to frambebuffer color transform | |
def view3d_to_texture(region, space_data): | |
"""Render 3D View to Texture""" |
This file contains 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
# Reading from render result without heavy workarounds | |
# Supports 2.93 | |
# Author Iyad Ahmed (Twitter: @cgonfire, email: iyadahmed@cgonfire.com) | |
# Licensed under GPL-3 | |
import bgl | |
import bpy | |
import gpu | |
import numpy as np |