Skip to content

Instantly share code, notes, and snippets.

View botamochi6277's full-sized avatar

botamochi botamochi6277

View GitHub Profile
@botamochi6277
botamochi6277 / OVRLightSaber.cs
Created January 10, 2020 05:57
LightSaber Lv02
using UnityEngine;
/// <sammary>
/// オリジナルライトセイバーを実装する Lv02
/// </sammary>
public class OVRLightSaber : CustomOVRGrabbable {
[SerializeField]
protected GameObject m_blade; // 光刃 z方向に長い
protected PhysicalLaserPointer m_laser;// 光刃(LineRenderer based)用クラス
@botamochi6277
botamochi6277 / OVRLightSaber.cs
Last active December 29, 2019 13:43
LightSaber Lv01
using UnityEngine;
/// <sammary>
/// オリジナルライトセイバーを実装する Lv01
/// </sammary>
public class OVRLightSaber : CustomOVRGrabbable {
protected PhysicalLaserPointer m_laser;// 光刃用クラス
// 手離したら光刃をOFFにする
@botamochi6277
botamochi6277 / CustomOVRGrabbable.cs
Last active January 24, 2020 01:33
CustomOVR Grabber and Grabbable Set
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
public class CustomOVRGrabbable : OVRGrabbable, IfGrabbable {
[SerializeField]
protected Transform m_bodyTrans;
@botamochi6277
botamochi6277 / Lissajous-bpy.py
Created November 13, 2019 05:51
Blender Plot3D
# This script is based on the following discussion.
# https://blenderartists.org/t/how-do-i-create-a-simple-curve-in-python/477260/5
import bpy
import numpy as np
import math
import mathutils
def Lissajous(t, a=1, b=2, delta=0):
@botamochi6277
botamochi6277 / blender-wave.py
Created November 6, 2019 10:02
Blender SurfacePlot
import bpy
import numpy as np
import math
import mathutils
def WaveXY(x, y, x0=0, y0=0, period=1, a=1):
# Cos Wave
r = np.sqrt((x - x0) ** 2 + (y - y0) ** 2)
return a * np.cos(2.0 * np.pi * r / period)
@botamochi6277
botamochi6277 / style.css
Last active August 22, 2019 06:10
IcoMoon Customize
/* Additonal classes according to FontAwesome */
/* makes the font 33% larger relative to the icon container */
.fb-lg {
font-size: 1.33333333em;
line-height: 0.75em;
vertical-align: -15%;
}
.fb-2x {
font-size: 2em;
@botamochi6277
botamochi6277 / M5Servo.h
Created July 24, 2019 05:29
M5Stack-with-RCServo
#ifndef _M5_SERVO_
#define _M5_SERVO_
// http://ogimotokin.hatenablog.com/entry/2018/07/22/182140
class M5Servo{
protected:
constexpr static const float MIN_WIDTH_MS = 0.6;
constexpr static const float MAX_WIDTH_MS = 2.4;
constexpr static const int LEDC_CHANNEL = 3;
@botamochi6277
botamochi6277 / M5StackFire_MPU9250_ROS.ino
Created July 22, 2019 04:44
M5Stack, MPU9250 and ROS Publisher Example Code
/*
M5Stack Fire
M5Stack, MPU9250 and ROS Publisher Example Code
by: Kris Winer
date: April 1, 2014
license: Beerware - Use this code however you'd like. If you
find it useful you can buy me a beer some time.
Modified by Brent Wilkins July 19, 2016
@botamochi6277
botamochi6277 / test_run.cpp
Last active April 27, 2019 12:38
A ROS package to control Tamiya's Cam-Program Robot
/**
* @brief Drive brushed DC-motors with TB6612
* @author botamochi6277
*/
#include "ros/ros.h"
#include <iostream>
#include <chrono>
#include <thread>
#include <TB6612.hpp>
@botamochi6277
botamochi6277 / DualMPU9250Basic.ino
Created December 1, 2018 09:15
Dual MPU9250 libraries for M5stack
/**
* MPU9250 Basic Example Code for Dual MPU9250
* Copyright (c) 2014 Kris Winer
* Copyright (c) 2018 botamochi6277
* license: Beerware - Use this code however you'd like. If you
* find it useful you can buy me a beer some time.
*/
#include <M5Stack.h>
#include "utility/MPU9250.h"