approximation

Convert light frequency to RGB?

余生长醉 提交于 2019-11-26 22:19:08
问题 Does anyone know of any formula for converting a light frequency to an RGB value? 回答1: Here's a detailed explanation of the entire conversion process: http://www.fourmilab.ch/documents/specrend/. Source code included! 回答2: For lazy guys (like me), here is an implementation in java of the code found in @user151323 's answer (that is, just a simple translation from pascal code found in Spectra Lab Report): static private double Gamma = 0.80; static private double IntensityMax = 255; /** Taken

Increasing accuracy of solution of transcendental equation

℡╲_俬逩灬. 提交于 2019-11-26 11:24:51
I have a specific kinematics as a part of a more complex machine and need to compute some physical parameters that are very hard (more like impossible) to measure with proper accuracy with instruments I have at my disposal [kinematics] At first look it is a simple 1 degree of freedom arm (black) which can rotate around x axis. It has a weight to force it to go always up until it hit the mechanic endpoint (angle a0 ) or some tube (blue) with radius r0 . Arm rotation center is at y0 . The tube can be moved to any y(t) height. [usage] This is used to measure the radius of a tube for further

Choosing random numbers efficiently

和自甴很熟 提交于 2019-11-26 11:24:09
问题 I have a method, which uses random samples to approximate a calculation. This method is called millions of times, so its very important that the process of choosing the random numbers is efficient. I\'m not sure how fast javas Random().nextInt really are, but my program does not seem to benefit as much as I would like it too. When choosing the random numbers, I do the following (in semi pseudo-code): // Repeat this 300000 times Set set = new Set(); while(set.length != 5) set.add(randomNumber

Unable to approximate the sine function using a neural network

杀马特。学长 韩版系。学妹 提交于 2019-11-26 10:51:26
问题 I am trying to approximate the sine() function using a neural network I wrote myself. I have tested my neural network on a simple OCR problem already and it worked, but I am having trouble applying it to approximate sine(). My problem is that during training my error converges on exactly 50%, so I\'m guessing it\'s completely random. I am using one input neuron for the input (0 to PI), and one output neuron for the result. I have a single hidden layer in which I can vary the number of neurons

Approximating data with a multi segment cubic bezier curve and a distance as well as a curvature contraint

谁说胖子不能爱 提交于 2019-11-26 08:56:42
I have some geo data (the image below shows the path of a river as red dots) which I want to approximate using a multi segment cubic bezier curve. Through other questions on stackoverflow here and here I found the algorithm by Philip J. Schneider from "Graphics Gems". I successfully implemented it and can report that even with thousands of points it is very fast. Unfortunately that speed comes with some disadvantages, namely that the fitting is done quite sloppily. Consider the following graphic: The red dots are my original data and the blue line is the multi segment bezier created by the

Increasing accuracy of solution of transcendental equation

不问归期 提交于 2019-11-26 02:25:22
问题 I have a specific kinematics as a part of a more complex machine and need to compute some physical parameters that are very hard (more like impossible) to measure with proper accuracy with instruments I have at my disposal [kinematics] At first look it is a simple 1 degree of freedom arm (black) which can rotate around x axis. It has a weight to force it to go always up until it hit the mechanic endpoint (angle a0 ) or some tube (blue) with radius r0 . Arm rotation center is at y0 . The tube

Approximating data with a multi segment cubic bezier curve and a distance as well as a curvature contraint

三世轮回 提交于 2019-11-26 02:01:28
问题 I have some geo data (the image below shows the path of a river as red dots) which I want to approximate using a multi segment cubic bezier curve. Through other questions on stackoverflow here and here I found the algorithm by Philip J. Schneider from \"Graphics Gems\". I successfully implemented it and can report that even with thousands of points it is very fast. Unfortunately that speed comes with some disadvantages, namely that the fitting is done quite sloppily. Consider the following

How approximation search works

北城余情 提交于 2019-11-25 23:09:51
问题 [Prologue] This Q&A is meant to explain more clearly the inner working of my approximations search class which I first published here Increasing accuracy of solution of transcendental equation I was requested for more detailed info about this few times already (for various reasons) so I decided to write Q&A style topic about this which I can easily reference in the future and do not need to explain it over and over again. [Question] How to approximate values/parameters in Real domain ( double