Quantcast
Channel: VBForums - Maths Forum
Browsing all 132 articles
Browse latest View live

[RESOLVED] 2D translate + scale + rotate

My ZoomPictureBox (see sig) provides image dragging and zooming, with zooming around an arbitrary point such as the mouse position. I'm now trying to do something similar in WPF, but with image...

View Article



Image may be NSFW.
Clik here to view.

[RESOLVED] calculating vertices of a square

assuming i have a square: Attachment 91803 + i know the coordinates of point A + point C, or the coordinates of point B + point D... how can i find the coordinates of the other 2 points? Attached...

View Article

Image may be NSFW.
Clik here to view.

[RESOLVED] calculating columnIndex, rowIndex from point

i have a picturebox that has a hexagon grid drawn on it: Attachment 91897 at runtime, as i move my mouse over the picturebox, i want to calculate the columnIndex + rowIndex that contains the...

View Article

Image may be NSFW.
Clik here to view.

[RESOLVED] calculate largest rectangle that fits in ellipse

how can i calculate the largest rectangle that fits in an ellipse + the 4 points that describe that rectangle? see image... the green rectangle is what i'm looking for: Attachment 91973 Attached Images  

View Article

Calculate Inclination from Pitch and Roll

Hello! My english is not so good but I hope you can understand me. My problem is that I have values for pitch and roll angle (range: +90° ... -90°). pitch is inclination from vertical at x-direction,...

View Article


Calculating the start index of a string

I'm creating a hangman game and I have everything working, but this one issue. What I'm doing is choosing a random word here: vb.net Code: 'Choose a randomword        Dim r As New Random        Dim int...

View Article

x ^ y Mod z

Hi, I was wondering if there's any general algorithm where you can calculate x^y Mod z assuming they're all positive integers without having to calculate x^y (since extremely large results don't keep...

View Article

Combinations with different probability

Lets say I have 5 independent events (A-E): Pr(A) = 0,5 Pr(B) = 0,4 Pr(C) = 0,3 Pr(D) = 0,2 Pr(E) = 0,1 One "attempt" per event. I want to calculate the probability of three succesful events. I do it...

View Article


Battery charge cycle math

According to Apple, an iPhone battery can go through 400 charge cycles before the capacity diminishes to 80%, assuming nothing happens that is known to degrade the battery's life (i.e, the temperature...

View Article


Image may be NSFW.
Clik here to view.

Magic square, 5x5, even numbers from 2 to 50 totalling 130

My son got an assignment and I am trying to help him solve it but I am also unable to find the solution, can anyone here help me out? Google was not helpful also. He has got to solve a magic square and...

View Article

Image may be NSFW.
Clik here to view.

[RESOLVED] Magic square, 5x5, even numbers from 2 to 50 totalling 130

My son got an assignment and I am trying to help him solve it but I am also unable to find the solution, can anyone here help me out? Google was not helpful also. He has got to solve a magic square and...

View Article

Puzzle

1. Show that 30^239 + 239^30 is not prime. 2. Investigate when (p-1)^q + q^(p-1) is divisible by p, for primes p and q. Fermat's Little Theorem may be helpful.

View Article

How to Find R in formula??

hi all, am using DAO in VB6 and MS-Access as back hand. now, i have a formula, u can find out EMI for Loan with that formula. formula is as below. EMI = P * R * (1 + R)^N / ((1 + R)^N - 1) ----> Plz...

View Article


[RESOLVED] How to Find R in formula??

hi all, am using DAO in VB6 and MS-Access as back hand. now, i have a formula, u can find out EMI for Loan with that formula. formula is as below. EMI = P * R * (1 + R)^N / ((1 + R)^N - 1) ----> Plz...

View Article

Exponential Moving Average

Does anyone having a function to calculate EMA that they would be willing to share? Would like to input an array of values & a period & get back the EMA value. Thanks if you can help...

View Article


Holt-Winters Triple Exponential smoothing

I am trying to code Holt-Winters Triple Exponential smoothing in VB.NET. http://www.itl.nist.gov/div898/handb...on4/pmc435.htm The part I am struggling with is "alpha, beta and gamma are constants that...

View Article

How things add up

I got this wrong when it was said as a sentence: What is forty plus forty times zero plus one? I said one. The person that asked me said no it is forty one. I plugged that into a program as: Dim X as...

View Article


Techniques on oral/mental math

My 9 year old son will compete on a mental/oral math competition next week, anyone here who can provide tips or provide a link for some tip and tricks? TIA

View Article

intersection point slightly off

the code i've posted is supposed to find the intersection point of 2 lines, but it's slightly wrong. i make the point of intersection 122,42, but i think getnode (i found this function on msdn) finds...

View Article

Image may be NSFW.
Clik here to view.

[RESOLVED] calculate points on line

how can i calculate points 5 pixels from both ends on the 2 black lines in the attached image? Attachment 98299 the lines are parallel + spaced approximately 24 pixels apart. this is the code i used to...

View Article
Browsing all 132 articles
Browse latest View live




Latest Images