Search Results

Search found 2 results on 1 pages for 'goldbishop'.

Page 1/1 | 1 

  • Graduated transition from Green - Yellow - Red

    - by GoldBishop
    I have am having algorithm mental block in designing a way to transition from Green to Red, as smoothly as possible with a, potentially, unknown length of time to transition. For testing purposes, i will be using 300 as my model timespan but the methodology algorithm design needs to be flexible enough to account for larger or even smaller timespans. Figured using RGB would probably be the best to transition with, but open to other color creation types, assuming its native to .Net (VB/C#). Currently i have: t = 300 x = t/2 z = 0 low = Green (0, 255, 0) mid = Yellow (255, 255, 0) high = Red (255, 0, 0) Lastly, sort of an optional piece, is to account for the possibility of the low, mid, and high color's to be flexible as well. I assume that there would need to be a check to make sure that someone isnt putting in low = (255,0,0), mid=(254,0,0), and high=(253,0,0). Outside of this anomaly, which i will handle myself based on the best approach to evaluate a color. Question: What would be the best approach to do the transition from low to mid and then from mid to high? What would be some potential pitfalls of implementing this type of design, if any?

    Read the article

  • Obtain reference to Parent object during instantiation

    - by GoldBishop
    I have a situation where a custom class is a property of another class. What i need to be able to do, if it is possible at all, is obtain a reverse to the "parent" class (ie the the class that holds the current class as a property). For Instance: Public Class Class1 ... public readonly property Prop11 as Class2 public property Prop12 as String ... End Class Public Class Class2 ... private _par as Class1 private _var21 as string ... Public Sub New(...) me._par = ???? ... End Sub public readonly property Prop21 as string Get return me._par.Prop12 & me._var21 End Get End Property ... End Class Ultimately, i am trying to access other properties within Class1 from Class2 as they do have substance for information from within Class2. There are several other classes within Class1 that provide descriptive information to other classes contained within it as properties but the information is not extensible to all of the classes through Inheritance, as Class1 is being used as a resource bin for the property classes and the application itself. Diagram, lazy design ;): Application <- Class1.Prop12 Application <- Class1.Prop11.Prop21 Question: Is it possible to get a recursion through this design setup?

    Read the article

1